@comparaonline/ui-offer-empty
v5.4.4
Published
### Installation
Downloads
35
Maintainers
Keywords
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;
}