Skip to main content

PrimaryButton

Content

Primary button of project which should be used as a button component. Provides several built-in type scenarios.

Params

Extends PressableProps and additionally adds next properties

NameTypeRequiredDefault valueDescription
labelstringTrue-Label of button
typeButtonTypeTrue-Button type based on which different styles will be shown
roundedbooleanFalseUndefinedShould the corners be rounded
labelstringFalseUndefinedStyle of container
iconImageURISourceFalseUndefinedCustom icon
iconStyleStyleProp<ImageStyle>FalseUndefinedCustom icon's style
platformIconPropsIIconPlatformPropsFalseUndefinedPlatform icon props which will be used if icon is not provided
labelStyleTextStyleFalseUndefinedLabel's style
isLoadingbooleanFalseUndefinedShows activity indicator

Usage example

      <PrimaryButton type={ButtonType.solid} label={"Select date"} onPress={onPress} />