Skip to content

Commit

Permalink
au moins ça marche mais pas de stack
Browse files Browse the repository at this point in the history
  • Loading branch information
RVassili committed Apr 5, 2022
1 parent 694c6c6 commit 96b7cd6
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/frontend/components/Button/ButtonLayout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useContext } from 'react';
import { Box, Text, ResponsiveContext, Stack } from 'grommet';
import { Box, Text, ResponsiveContext } from 'grommet';
import styled from 'styled-components';

import { SvgProps } from 'components/SVGIcons';
Expand Down Expand Up @@ -67,12 +67,10 @@ export const ButtonLayout = ({
const rectColor = reversed ? tintColor : undefined;

return (
<Box align="center" fill>
<Box align="center" flex height="100%">
{Icon && (
<Stack anchor="bottom-right" fill>
<IconBox screenSize={size}>
<Icon focusColor={rectColor} height="100%" iconColor={iconColor} />
</IconBox>
<IconBox screenSize={size}>
<Icon iconColor={iconColor} focusColor={rectColor} height="100%" />
{badge && (
<Box
align="center"
Expand All @@ -83,13 +81,14 @@ export const ButtonLayout = ({
}}
pad={{ horizontal: '3px', vertical: '1px' }}
round="6px"
style={{ position: 'absolute', bottom: '0px', right: '0px' }}
>
<StyledTextBadge color={tintColor} size="0.688rem">
{badge}
</StyledTextBadge>
</Box>
)}
</Stack>
</IconBox>
)}

{label && (
Expand Down

0 comments on commit 96b7cd6

Please sign in to comment.