Atom components
Atoms are core UI components that are re-used in all of our modals.
Input#
Props#
label#
string
The input label.
required#
boolean
Adds a "*" beside the label.
id#
string
Input id, also added to the htmlFor label attribute.
error#
string
Will add an error paragraph at the bottom of the input & display the error styling.
errorId#
string
The error paragraph id.
className#
string
Appended to the input field className attribute.
labelClassName#
string
Appended to the label className attribute.
errorClassName#
string
Appended to the error paragraph className attribute.
wrapperClassName#
string
Appended to the input wrapper className attribute.
info
Also accepts any prop that HTML input element supports.
TextArea#
Props#
label#
string
The input label.
required#
boolean
Adds a "*" beside the label.
id#
string
Input id, also added to the htmlFor label attribute.
error#
string
Will add an error paragraph at the bottom of the input & display the error styling.
errorId#
string
The error paragraph id.
className#
string
Appended to the input field className attribute.
labelClassName#
string
Appended to the label className attribute.
errorClassName#
string
Appended to the error paragraph className attribute.
wrapperClassName#
string
Appended to the input wrapper className attribute.
info
Also accepts any prop that HTML input element supports.
Button#
Props#
variant#
"solid"|"outline"|"icon"|"ghost"
The button style varient, default is "solid".
icon#
Element
Prefixes the button with an icon.
isLoading#
boolean
Triggers loading & disable state.
disabled#
boolean
Triggers disabled state.
className#
string
Appended to the button className attribute.
info
Also accepts any prop that HTML button element supports.
Checkbox#
Props#
className#
string
Appended to the checkbox className attribute.
labelClassName#
string
Appended to the label className attribute.
id#
string
The checkbox element id.
info
Also accepts any prop that HTML input element supports.
Radio#
Props#
className#
string
Appended to the radio className attribute.
labelClassName#
string
Appended to the label className attribute.
id#
string
The radio element id.
info
Also accepts any prop that HTML input element supports.
DatePicker#
Props#
label#
string
The input label.
required#
boolean
Adds a "*" beside the label.
id#
string
Input id, also added to the htmlFor label attribute.
error#
string
Will add an error paragraph at the bottom of the input & display the error styling.
errorId#
string
The error paragraph id.
tooltipText#
string
Adds a tooltip icon next to the label that displays the given text when on hover.
className#
string
Appended to the input field className attribute.
labelClassName#
string
Appended to the label className attribute.
errorClassName#
string
Appended to the error paragraph className attribute.
wrapperClassName#
string
Appended to the input wrapper className attribute.
info
Also accepts any prop that HTML input element supports.
Link#
Props#
href#
string
The anchor tag href.
isButton#
boolean
Sets the anchor role as button.
className#
string
Appended to the anchor tag className attribute.
info
Also accepts any prop that anchor element supports.
Select#
Props#
label#
string
The input label.
required#
boolean
Adds a "*" beside the label.
id#
string
Input id, also added to the htmlFor label attribute.
error#
string
Will add an error paragraph at the bottom of the input & display the error styling.
errorId#
string
The error paragraph id.
className#
string
Appended to the input field className attribute.
labelClassName#
string
Appended to the label className attribute.
errorClassName#
string
Appended to the error paragraph className attribute.
wrapperClassName#
string
Appended to the select wrapper className attribute.
info
Also accepts any prop that HTML input element supports.
Modal#
Used to create custom modals.
Props#
id#
string
Modal container id attribute, also used in analytics to identify the modal.
onDisplay#
() โ void
Callback function called when the modal is first displayed.
onClose#
() โ void
Callback function called when the modal is closed.
className#
string
Appended to the modal container className attribute.
hideCloseButton#
boolean
Hides the modal's close button when true.
Notification#
Show a toast notification. this component is a wrapper around react-hot-toast's Toaster component, and the notify function is an alias for it's toast function.
If you're using the PelcroModalController then you can add the Notification component as a child component, and then you can call notify anywhere, even outside React, to show a notification
Props#
Tooltip#
Props#
value#
string
The value displayed when hovering on the tooltip icon.
className#
string
Appended to the tooltip container className attribute.