0.2.4 • Published 5 years ago

callmd-guideline v0.2.4

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
5 years ago

#Demo http://85.143.172.24:4000/

##Install npm i callmd-guideline --save

##Import import { Container, Button, Input, ... } from 'callmd-guideline';

##Link if you need simple link:

<Link href="your url" className='underline black'>some text</Link>

if you use the react-router
<Link to="your url" className='underline black'>some text</Link>

##Container ...

##Label ...

##Radio <Radio label='some text' checked={this.state.checked} onChange={() => this.setState({ checked: !this.state.checked })} />

##Checkbox <Checkbox label='some text' checked={this.state.checked} onChange={() => this.setState({ checked: !this.state.checked })} />

##Input

##Textarea

##Phone <Phone placeholder='...' label='...' message='...' value='...' onChange={...} country={ { code: '+1', name: 'USA', img: require('url to image') }, { code: '+7', name: 'Russia', img: require('url to image') }, { code: '+44', name: 'United Kingdom', img: require('url to image') }, } />

##Password

##Datepicker // to select single date // uses moment.js

<Datepicker
    label='Select date'
    date={this.state.date} // example: moment()
    onChange={(newDate) => this.setState({ date: newDate })}
    minYear={1800}
    maxYear={2019}
    
    // optional, default values are displayed
    format={{
        input: 'DD-MM-YYYY',
        month: 'MMMM',
        year: 'YYYY',
        daysOfWeek: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
    }}
/>

##ModalDatepicker <ModalDatepicker label='Modal datepicker' date={this.state.date} onChange={(newDate) => this.setState({ date: newDate })} style={{ marginRight: '30px' }} text={{ title: 'Some title', save: 'Save', cancel: 'Cancel', nullDate: 'Select date', days: 'Day', months: 'Month', years: 'Year', }} />

##Button ...

##Check Button <CheckButton className='green' // or red onClick={() => this.setState({ active: !this.state.active })} active={this.state.active}

>
    Some text
</CheckButton>

##Burger

##Modal {this.state.isOpen && <Modal width={300} height={400} close={() => this.setState({ isOpen: false })} />}

##Dropdown <Dropdown label='...' className='small ap' rows={ { value: 1, selected: false, onClick={() => selectRow(1) } }, { value: 2, selected: true, onClick={() => selectRow(2) } }, { value: 3, selected: false, onClick={() => selectRow(3) } } } />

##Multiselect <Multiselect label='...' rows={ { value: 1, selected: false, onClick={() => selectRow(1) } }, { value: 2, selected: true, onClick={() => selectRow(2) } }, { value: 3, selected: false, onClick={() => selectRow(3) } } } />

##Toast {this.state.show && <Toast close={() => this.setState({ show: false })}>Hello}

##Table

<Table
    head={{
        id: 'Id',
        name: 'Name',
        age: 'Age',
        sex: 'Sex',
    }}
    body=[
        { id: 1, name: 'Alex', age: 23, sex: 'M' },
        { id: 2, name: 'Shon', age: 23, sex: 'M' },
        { id: 3, name: 'Rick', age: 23, sex: 'M' },
        { id: 4, name: 'Page', age: 18, sex: 'W' },
    ]
/>

##Slider // add interval for auto scrolling (in milliseconds)

    <div style={{ background: '#3399FF' }}>slide 1</div>
    <div style={{ background: '#ee5d58' }}>slide 2</div>
    <div style={{ background: '#6FD7A0' }}>slide 3</div>
    <div style={{ background: '#ffc32f' }}>slide 4</div>
    <div style={{ background: '#ebebe4' }}>slide 5</div>
    <div style={{ background: '#37404a' }}>slide 6</div>
</Slider>

##Swiper // add interval for auto scrolling (in milliseconds)

    <div style={{ background: '#3399FF', width: '50px', height: '50px' }}>slide 1</div>
    <div style={{ background: '#ee5d58', width: '150px', height: '50px' }}>slide 2</div>
    <div style={{ background: '#6FD7A0', width: '50px', height: '50px' }}>slide 3</div>
    <div style={{ background: '#ffc32f', width: '200px', height: '50px' }}>slide 4</div>
    <div style={{ background: '#ebebe4', width: '200px', height: '50px' }}>slide 5</div>
    <div style={{ background: '#37404a', width: '150px', height: '50px' }}>slide 6</div>
    <div style={{ background: '#3399FF', width: '50px', height: '50px' }}>slide 7</div>
    <div style={{ background: '#ee5d58', width: '150px', height: '50px' }}>slide 8</div>
    <div style={{ background: '#6FD7A0', width: '50px', height: '50px' }}>slide 9</div>
    <div style={{ background: '#ffc32f', width: '200px', height: '50px' }}>slide 10</div>
    <div style={{ background: '#ebebe4', width: '200px', height: '50px' }}>slide 11</div>
    <div style={{ background: '#37404a', width: '150px', height: '50px' }}>slide 12</div>
    <div style={{ background: '#3399FF', width: '50px', height: '50px' }}>slide 13</div>
    <div style={{ background: '#ee5d58', width: '150px', height: '50px' }}>slide 14</div>
    <div style={{ background: '#6FD7A0', width: '50px', height: '50px' }}>slide 15</div>
    <div style={{ background: '#ffc32f', width: '200px', height: '50px' }}>slide 16</div>
    <div style={{ background: '#ebebe4', width: '200px', height: '50px' }}>slide 17</div>
    <div style={{ background: '#37404a', width: '150px', height: '50px' }}>slide 18</div>
</Swiper>

##MobileAppLink // uses userAgent to display the link // show only on mobile devices // show only on the transferred devices

<MobileAppLink
    config={{
        Android: 'http://link-to-googleplay',
        iPhone: 'http://link-to-appstore',
    }}
    text='Install the app'
/>
0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.43

5 years ago

0.1.42

5 years ago

0.1.41

5 years ago

0.1.40

5 years ago

0.1.39

5 years ago

0.1.38

5 years ago

0.1.37

5 years ago

0.1.36

5 years ago

0.1.35

5 years ago

0.1.34

5 years ago

0.1.33

5 years ago

0.1.32

5 years ago

0.1.31

5 years ago

0.1.30

5 years ago

0.1.29

5 years ago

0.1.28

5 years ago

0.1.27

5 years ago

0.1.26

5 years ago

0.1.25

5 years ago

0.1.24

5 years ago

0.1.23

5 years ago

0.1.22

5 years ago

0.1.21

5 years ago

0.1.20

5 years ago

0.1.19

5 years ago

0.1.18

5 years ago

0.1.17

5 years ago

0.1.16

5 years ago

0.1.15

5 years ago

0.1.14

5 years ago

0.1.13

5 years ago

0.1.12

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.60

5 years ago

0.0.59

5 years ago

0.0.58

5 years ago

0.0.57

5 years ago

0.0.56

5 years ago

0.0.55

5 years ago

0.0.54

5 years ago

0.0.53

5 years ago

0.0.52

5 years ago

0.0.51

5 years ago

0.0.50

5 years ago

0.0.49

5 years ago

0.0.48

5 years ago

0.0.47

5 years ago

0.0.46

5 years ago

0.0.45

5 years ago

0.0.44

5 years ago

0.0.43

5 years ago

0.0.42

5 years ago

0.0.41

5 years ago

0.0.40

5 years ago

0.0.39

5 years ago

0.0.38

5 years ago

0.0.37

5 years ago

0.0.36

5 years ago

0.0.35

5 years ago

0.0.34

5 years ago

0.0.33

5 years ago

0.0.32

5 years ago

0.0.31

5 years ago

0.0.30

5 years ago

0.0.29

5 years ago

0.0.28

5 years ago

0.0.27

5 years ago

0.0.26

6 years ago

0.0.25

6 years ago

0.0.24

6 years ago

0.0.23

6 years ago

0.0.22

6 years ago

0.0.21

6 years ago

0.0.20

6 years ago

0.0.19

6 years ago

0.0.18

6 years ago

0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago