1.0.14 • Published 4 years ago

@triko-app/base v1.0.14

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Triko Base components

Structure

|__ src 
    |__ anims
    |    |__ animated-arrow-down
    |    |__ animated-arrow-left
    |    |__ animated-arrow-right
    |    |__ animated-arrow-up
    |    |__ circle-wave
    |    |__ scale
    |    |__ slide        
    |
    |__ components
    |    |__ label
    |    |__ location-provider    
    |    |__ network-status
    |    |__ text
    |    |__ version-display
    |
    |__ loaders
    |    |__ loader-icon
    |    |__ loader-screen

Components definition

AnimatedArrowDown

Displays an animated arrow down

locationtypes
src/anims/animated-arrow-downsrc/anims/types.ts

Props

namerequiredtypedescriptiondefault
contentOnDoneNobooleanIf the content will be displayed only when the animation it's done
delayNonumberThe delay applied to the animation0
durationNonumberThe duration applied to the animation2000
styleNoanyStyles applied to the component{}
onAnimationCompletedNovoidFunction to be triggered when the animation its done

AnimatedArrowLeft

Displays an animated arrow left

locationtypes
src/anims/animated-arrow-leftsrc/anims/types.ts

Props

namerequiredtypedescriptiondefault
contentOnDoneNobooleanIf the content will be displayed only when the animation it's done
delayNonumberThe delay applied to the animation0
durationNonumberThe duration applied to the animation2000
styleNoanyStyles applied to the component{}
onAnimationCompletedNovoidFunction to be triggered when the animation its done

AnimatedArrowRight

Displays an animated arrow right

locationtypes
src/anims/animated-arrow-rightsrc/anims/types.ts

Props

namerequiredtypedescriptiondefault
contentOnDoneNobooleanIf the content will be displayed only when the animation it's done
delayNonumberThe delay applied to the animation0
durationNonumberThe duration applied to the animation2000
styleNoanyStyles applied to the component{}
onAnimationCompletedNovoidFunction to be triggered when the animation its done

AnimatedArrowUp

Displays an animated arrow up

locationtypes
src/anims/animated-arrow-upsrc/anims/types.ts

Props

namerequiredtypedescriptiondefault
contentOnDoneNobooleanIf the content will be displayed only when the animation it's done
delayNonumberThe delay applied to the animation0
durationNonumberThe duration applied to the animation2000
styleNoanyStyles applied to the component{}
onAnimationCompletedNovoidFunction to be triggered when the animation its done

Image

Renders an image

locationtypes
src/components/imagesrc/types/image.types.ts

Props

namerequiredtypedescriptiondefault
resizeModeNo'contain' \| 'cover' \| 'stretch' \| 'center'Resize mode to apply'contain'
sourceYes{uri: string} | resourceImage source, can be a url object {uri: '...'} or a resource
styleNoanyStyles to be applied

Label

This component allows to create a form label.

locationtypes
src/components/labelsrc/types/label.types.ts

Props

namerequiredtypedescriptiondefault
childrenYesReactNode \| stringThe text you want to display
requiredNobooleanIf the label should contain a required mark
disabledNobooleanIf the label must be displayed as disabled
secondaryNobooleanIf the label should display secondary color
styleNoanyStyles to apply to the label

LoaderIcon

This component renders an animated icon loader

locationtypes
src/loaders/loader-iconsrc/types/loader-icon.types.ts

Props

namerequiredtypedescriptiondefault
delayNonumberA delay for animation start0
durationNonumberAnimation duration1000
isTrikoNobooleanIf should load the triko icon or user icontrue

LoaderScreen

Component which renders a full screen loader, useful to hide content to the user while the data is loading

locationtypes
src/loaders/loader-screensrc/types/loader-screen.types.ts

Props

namerequiredtypedescriptiondefault
textNostring \| booleanA text to display when loading

NetworkStatus

Validates the device network connection, in case the connection is lost the content (children) is hidden and the user is notified

locationtypes
src/components/network-statussrc/types/network-status.types.ts

Props

namerequiredtypedescriptiondefault
childrenNoReactNodeThe content to be hiden when the connection is lost

Text

This component renders a text for the application, also try to translate it's content using the translation service

locationtypes
src/components/textsrc/types/text.types.ts
namerequiredtypedescriptiondefault
childrenNostring, ReactNodeThe thext to be diplayed
replacementsNo{[key: string]: string \| number \| boolean}Map whith replacements on the translation
styleNo{ [key: string]: StyleProp<any> } \| { [key: string]: StyleProp<any> }[]Styles to apply
colorNostringA color to apply
variantNo'text' \| 'title' \| 'subtitle' \| 'label' \| 'caption' \| 'title-primary' \| 'link'Type of thext to render'text'

VersionDisplay

Displays the current application version

locationtypes
src/components/version-displaysrc/types/version-display.types.ts

Props

namerequiredtypedescriptiondefault
classesNoanyClassNames to be applied to the component{}

Props

namerequiredtypedescriptiondefault
1.0.14

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.0

4 years ago