Skip to content

Commit

Permalink
update GenericPressable propTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
robertKozik committed Apr 27, 2023
1 parent 9243829 commit e20f562
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/Pressable/GenericPressable/PropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,40 +39,40 @@ const pressablePropTypes = {
* style for when the component is disabled. Can be a function that receives the component's state (active, disabled, hover, focus, pressed, isScreenReaderActive)
* @default {}
* @example {backgroundColor: 'red'}
* @example state => ({backgroundColor: state.active ? 'red' : 'blue'})
* @example state => ({backgroundColor: state.isDisabled ? 'red' : 'blue'})
*/
disabledStyle: stylePropTypeWithFunction,

/**
* style for when the component is hovered. Can be a function that receives the component's state (active, disabled, hover, focus, pressed, isScreenReaderActive)
* @default {}
* @example {backgroundColor: 'red'}
* @example state => ({backgroundColor: state.active ? 'red' : 'blue'})
* @example state => ({backgroundColor: state.hover ? 'red' : 'blue'})
*/
hoverStyle: stylePropTypeWithFunction,

/**
* style for when the component is focused. Can be a function that receives the component's state (active, disabled, hover, focus, pressed, isScreenReaderActive)
* @default {}
* @example {backgroundColor: 'red'}
* @example state => ({backgroundColor: state.active ? 'red' : 'blue'})
* @example state => ({backgroundColor: state.focused ? 'red' : 'blue'})
*/
focusStyle: stylePropTypeWithFunction,

/**
* style for when the component is pressed. Can be a function that receives the component's state (active, disabled, hover, focus, pressed, isScreenReaderActive)
* @default {}
* @example {backgroundColor: 'red'}
* @example state => ({backgroundColor: state.active ? 'red' : 'blue'})
* @example state => ({backgroundColor: state.pressed ? 'red' : 'blue'})
*/
pressedStyle: stylePropTypeWithFunction,
pressStyle: stylePropTypeWithFunction,

/**
* style for when the component is active and the screen reader is on.
* Can be a function that receives the component's state (active, disabled, hover, focus, pressed, isScreenReaderActive)
* @default {}
* @example {backgroundColor: 'red'}
* @example state => ({backgroundColor: state.active ? 'red' : 'blue'})
* @example state => ({backgroundColor: state.isScreenReaderActive ? 'red' : 'blue'})
*/
screenReaderActiveStyle: stylePropTypeWithFunction,

Expand Down

0 comments on commit e20f562

Please sign in to comment.