Module: Components

Methods

(static) ColoredLabel(props)

Component used on dashboard to label date, volume and product with color.
Parameters:
Name Type Description
props properties Component properties.
Source:
Example
<ColoredLabel 
 containerStyle={styles.containerStyle}
 textStyle={styles.textStyle}
 labelText={'Example text'}
/>

const styles = StyleSheet.create({
 containerStyle : {
    width: 82,
    backgroundColor: 'blue',
    justifyContent: 'center',
    alignItems: 'center',
    padding: 5,
    borderRadius: 5
  },
    textStyle = {
      textAlign: 'center',
      fontFamily: 'MuseoSansRounded-700'
    } 
})

(static) CustomSwitch(props)

Custom switch used to turn notifications on/off in NotificationSettings.js.
Parameters:
Name Type Description
props properties Component properties
Source:
Example
<CustomSwitch
      label={'Example text'}
      labelDescription={'Example description'}
      state={starting state (true or false)}
      key={unique identifier}
      onChange={newValue => {
        do something with the new value.
      }}
/>

(static) ForTermination(props)

Component for dashboard showing orders that has a termination date.
Parameters:
Name Type Description
props properties Component properties.
Source:
Example
<ForTermination
 deposit={{
      "expire": 2021-01-12T00:00:00.000Z,
      "productId": "3",
      "type": "FIXED",
      "volume": 15,
    }}
 date={new Date(2021-01-12T00:00:00.000Z)}
 ftKey={unqiue identifier}
/>

(static) LogoutIcon(props)

Logout icon created from SVG from Fixrate. Used in the logout-button. Imported in NotificationSettings.js. Code is generated through https://react-svgr.com/playground/?native=true
Parameters:
Name Type Description
props styleObject
Source:

(static) MarketplaceIcon(props)

Marketplace icon created from SVG from Fixrate. Used in the tab-navigator. Imported in MainNavigator.js. Code is generated through https://react-svgr.com/playground/?native=true
Parameters:
Name Type Description
props styleObject
Source:

(static) NewAdIcon(props)

New Ad icon created from SVG from Fixrate. Used in tab-navigator. Imported in MainNavigator.js. Code is generated through https://react-svgr.com/playground/?native=true
Parameters:
Name Type Description
props styleObject
Source:

(static) NotificationBadge(props)

Component to show number of new ads and todo's. Imported in MainNavigator.js.
Parameters:
Name Type Description
props properties contains type and style.
Source:
Example
return(
 <NotificationBadge
   type="ads"
   customStyle={{ marginTop: 16, marginRight: 10 }}
 />
)

(static) OrderIcon(props)

Order icon created from SVG from Fixrate. Used on the tab-navigator. Imported in MainNavigator.js. Code is generated through https://react-svgr.com/playground/?native=true
Parameters:
Name Type Description
props styleObject
Source:

(static) Products(props)

Component used to show the users products on the dashboard. Shows the number of deposits, total volume and product.
Parameters:
Name Type Description
props properties Component properties
Source:
Example
<Products
 deposit={{
      product: '31 d',
      quantity: 5,
      volume: 44
    }}
 pKey={unique key}
/>

(static) SettingsIcon(props)

Settings icon created from SVG from Fixrate. Used on the headerNavigator Imported in MainNavigator.js. Code is generated through https://react-svgr.com/playground/?native=true
Parameters:
Name Type Description
props styleObject
Source:

(inner) DashboardIcon(props)

Dashboard icon created from SVG from Fixrate. Used on the tab-navigator. Imported in MainNavigator.js. Code is generated through https://react-svgr.com/playground/?native=true
Parameters:
Name Type Description
props styleObject
Source: