0.0.14 • Published 1 year ago

c5-ts-ui v0.0.14

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

c5-ts-ui

CircleCI codecov CircleCI GitHub repo file count GitHub package.json version GitHub

These are the components that we currently support

components

Button

nameoptionaldatatypedescription
label stringThe text to appear on the button
styleCSSPropertiesany additional css styles
onClickMouseEventCallback for button click
disabledbooleanused to disable the button
type'normal', 'green', 'purple', 'danger', 'info', 'success', 'error'different behaviors for the buttoon
size'small', 'medium', 'large'size of the button

RippleButton

nameoptionaldatatypedescription
text[]stringthe test to appear on the button
onClickMouseEventthe callback for the button click event
colorstringthe color scheme for the button
textColorstringthe color of the text
hoverColorstringthe hover color
styleCSSPropertiesany additional css styles
type'green', 'purple', 'danger', 'success', 'info'the style of the button

OutlineButton

nameoptionaldatatypedescription
text stringtest for the button
onClick MouseEventcallback for the button click event
type 'success','dark','info','error','warning','danger','default'type of button schema
styleCSSPropertiesany additional styling

TextField

nameoptionaldatatypedescription
id stringunique id
name stringname of the button
label stringlabel text associated with the button
onChange ChangeEventevent when the text changes
type 'text', 'number'type of input for the textfield
placeholderstringplaceholder text for empty inputfield
value 'string', 'number'value to assign to the field
errorstringerror message to display under the field
readOnlybooleanused to disable the field
autocomplete'on', 'off', stringused to disable auto completes
theme'light', 'dark'theme for the background

SelectField

nameoptionaldatatypedescription
id stringunique id
name stringname of the field
label stringlabel associated with the field
onChange ChangeEventevent when the option changes
valueField Field from datafield to assign to the value from the data
displayField Field from datafield to display as the option from the data
errorstringerror to display under the field
emptyMsg stringdefault value when the component loads
data datadata to assign to the field
theme'light', 'dark'theme for the background

CodeDisplay

all booleans default to true

nameoptionaldatatypedescription
code stringthe code to process
showLineNumbersbooleandefaults to true to show line numbers
formatbooleanwhether to format the code with prettier
parserType'babel', 'css', 'json', 'flow', 'babel-flow', 'babel-ts', 'typescript', 'json', 'markdown', 'html'format to use for prettier
colorInterfaceContentsbooleananything seperated by a color
interfaceKeycolorcolor of the left hand assignment
interfaceValuecolorcolor of the right hand assignment
enableDestructuredbooleancolor destructured props
destructuredcolorcolor of destructured props
curlyBracesColorcolorcolor of curly braces
enableCurlyBracesColorbooleanenable or disable the coloring
codeStrcoloranything between quotes
enableCodeStrbooleanenable or disable the coloring
codeQuotecolorcolor of quotation marks
enableCodeQuotebooleanenable or disable the coloring
betweenSingleQuotescoloranything between single quotes
enableBetweenSingleQuotesbooleanenable or disable coloring
codeSinglecolorcolor of single quotes
enableCodeSinglebooleanenable or disable the coloring
insideParenscoloranything between parenthesis
enableInsideParensbooleanenable or disable the coloring
parenscolorcolor of parenthesis
enableParensbooleanenable or disable the coloring
codElemcoloranything between < and >
enableCodeElembooleanenable or disable the coloring
reservedcolorcolor of reserved words
enableReservedbooleanenable or disable the coloring
appColorcolorcolor of app related words
enableAppColorbooleanenable or disable the coloring
defaultColorcolorcolor of default words
enableDefaultbooleanenable or disable the coloring
alternatescolorcolor of alternate words
enableAlternatesbooleanenable or disable the coloring
customReservedWordsstring arrayyour list of reserved words
customAppWordsstring arrayyour list of app words
customDefaultsstring arrayyour list of default words
customAlternativesstring arrayyour list of alternate words
enableOperatorColorbooleanenable or disable coloring
operatorColorcolorcolor of operators

ToggleSwitch

nameoptionaldatatypedescription
id stringthe id to associate with this instance
handleClick id=string, checked=booleanthis returns void
active booleanstate of the button display
disabledbooleandisable clicking of the component

CircularProgressBar

nameoptionaldatatypedescription
sizenumbersize of the progress bar
progress numberpercentage of progress
strokeWidthnumberthickness of the outer circle
circleStrokeOnecolorbackground color of stroke
showPercentbooleanwhether to show the number of percentage in the center
mode'light', 'dark'theme for progress bars text color

Tooltip

nameoptionaldatatypedescription
position?'top', 'left', right', 'bottom'where to position the tooltip relative to the children
children React Componentany React component to use for displaying the tooltip
message stringthe message to display inside of the tooltip
styleCss Propertiesadditional styling to add to the tooltip
theme'light', 'dark'theme to use for the tooltip
messageStyle?Css Propertiesadditional styles to add to the message

MultiSelect

nameoptionaldatatypedescription
data array of data T[]any array of data
defaultOption stringthe text to display in the select field
keyDescriptor stringdescription to use for the key
optionValue keyof Tused to store the string in the checked array
optionText keytof Tthe field to use to display in the checkbox
checkedItems string[]array to use to store the checked items
setCheckedItems functionfunction used to handle checking items
idstringid to use for the component
selectBoxIdstringid of the default item
backgroundColorstringcolor to use for the portal background
selectIdstringid to use for the select field
inputIdstringid of the input field

Password Strength Meter

nameoptionaldatatypedescription
userid numberuserid to associate with the password
confirmPasswordChange functionfunction to use when submitting the new password. returns new password

Calendar

nameoptionaldatatypedescription
onChange function takes datethe event to fire when a date has been clicked
datestringthe default date to make active on the calendar
eventsCalendarEvent[]an array of CalendarEvents

This calendar is capable of handling events in the props now

export interface CalendarEvent {
  id: number;
  date: Date;
  title: string;
  description: string;
  start?: string;
  end?: string;
}
0.0.10

1 year ago

0.0.11

1 year ago

0.0.12

1 year ago

0.0.13

1 year ago

0.0.14

1 year ago

0.0.3

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.6

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago