import React from 'react' ; import { Checkbox } from '@workday/canvas-kit-react/checkbox' ; import { FormField } from '@workday/canvas-kit-react/form-field' ; export const Error = ( ) => { const [ checked , setChecked ] = React . useState ( false ) ; const handleChange = ( event ) => { setChecked ( event . target . checked ) ; } ; return ( < FormField error = { FormField . ErrorType . Error } hintId = "hint-error" hintText = "You must agree to the terms before proceeding" > < Checkbox checked = { checked } label = "I agree to the terms" onChange = { handleChange } / > < /FormField>); } ;