5.4.4 • Published 5 years ago

@comparaonline/ui-offer-empty v5.4.4

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

ui-offer-empty

Installation

yarn add @comparaonline/ui-offer-empty

##Usage

import { Empty } from '@comparaonline/ui-offer-empty';
ProprequiredtypeDescription
textsfalseITextsProps ...Text Object

Implementation

import React, { useState } from 'react';
import { Empty } from '@comparaonline/ui-offer-empty';

const Results = () => {
    const [results, setResults] = useState([]);

    if (!Boolean(results.length)) {
        return <Empty texts={{ paragraph: 'My first paragraph', phone: 'some phone if exists, +5695674321', resume: 'a short description for phone maybe', whatsapp: { url: 'whatsapp url', message: 'the whatsapp message', description: 'the short description for whatsapp' } }} />
    }

    render() {
        return (
            <Grid>
                {results.map(result => <Result result={result} />)}
            </Grid>
        );
    }
}

Types

import { IEmptyProps, ITextsProps } from '@comparaonline/ui-offer-empty';

interface MyOwnProps {
  mytexts: ITextsProps;
}

interface MyOwnExtendedProps extends IEmptyProps {
  onemore: boolean;
}

Happy coding :sunglasses:

5.4.4

5 years ago

5.4.3

5 years ago

4.9.1

5 years ago

4.9.0

5 years ago

4.8.5

5 years ago

4.8.4

5 years ago

4.8.2

5 years ago

4.7.2

5 years ago

4.7.1

5 years ago

4.7.0

5 years ago

4.3.7

5 years ago

4.3.6

5 years ago

4.2.3

5 years ago