Used lozenge for txs

This commit is contained in:
sam-keen 2022-03-16 14:58:16 +00:00
parent a51a04c97b
commit 001848fc78
5 changed files with 12 additions and 3 deletions

View File

@ -19,7 +19,9 @@ export const RenderFetched = ({
}
if (error) {
return <StatusMessage className={className}>Error: {error}</StatusMessage>;
return (
<StatusMessage className={className}>Error retrieving data</StatusMessage>
);
}
return children;

View File

@ -1,3 +1,5 @@
import { Lozenge } from '@vegaprotocol/ui-toolkit';
interface TxOrderTypeProps {
orderType: string;
className?: string;
@ -34,6 +36,8 @@ const displayString: StringMap = {
export const TxOrderType = ({ orderType, className }: TxOrderTypeProps) => {
return (
<span className={className}>{displayString[orderType] || orderType}</span>
<Lozenge className={className}>
{displayString[orderType] || orderType}
</Lozenge>
);
};

View File

@ -64,7 +64,7 @@ export const TxsPerBlock = ({ blockHeight }: TxsPerBlockProps) => {
/>
</td>
<td>
<TxOrderType orderType={Type} />
<TxOrderType className="mb-4" orderType={Type} />
</td>
</tr>
);

View File

@ -8,6 +8,8 @@ export default {
const Template: Story = (args) => <Lozenge {...args}>lozenge</Lozenge>;
export const Default = Template.bind({});
export const WithDetails = Template.bind({});
WithDetails.args = {
details: 'details text',

View File

@ -9,6 +9,7 @@ export { FormGroup } from './components/form-group';
export { Icon } from './components/icon';
export { Input } from './components/input';
export { InputError } from './components/input-error';
export { Lozenge } from './components/lozenge';
export { Select } from './components/select';
export { TextArea } from './components/text-area';
export { ThemeSwitcher } from './components/theme-switcher';