@comparaonline/ui-offer-empty

yarn add @comparaonline/ui-offer-empty

Usage no npm install needed!

<script type="module">
  import comparaonlineUiOfferEmpty from 'https://cdn.skypack.dev/@comparaonline/ui-offer-empty';
</script>

README

ui-offer-empty

Installation

yarn add @comparaonline/ui-offer-empty

Usage

import { Empty } from '@comparaonline/ui-offer-empty';
Prop required type Description
texts false ITextsProps [...] 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: