Files
twenty/front/src/modules/ui/components/editable-cell/EditableCellDisplayMode.tsx
T
Charles Bochet d6364a9fdd Apply new theme (#449)
* Apply new theme

* Fix storybook

* Fixes

* Fix regressions
2023-06-26 19:13:04 -07:00

48 lines
1.2 KiB
TypeScript

import { ReactElement } from 'react';
import styled from '@emotion/styled';
export const EditableCellNormalModeOuterContainer = styled.div`
align-items: center;
display: flex;
height: 100%;
overflow: hidden;
padding-left: ${({ theme }) => theme.spacing(2)};
padding-right: ${({ theme }) => theme.spacing(1)};
width: 100%;
&:hover {
-moz-box-shadow: inset 0 0 0 1px
${({ theme }) => theme.font.color.extraLight};
-webkit-box-shadow: inset 0 0 0 1px
${({ theme }) => theme.font.color.extraLight};
background: ${({ theme }) => theme.background.transparent.secondary};
border-radius: ${({ theme }) => theme.border.radius.md};
box-shadow: inset 0 0 0 1px ${({ theme }) => theme.font.color.extraLight};
}
`;
export const EditableCellNormalModeInnerContainer = styled.div`
align-items: center;
display: flex;
height: 100%;
overflow: hidden;
width: 100%;
`;
type OwnProps = {
children: ReactElement;
};
export function EditableCellDisplayMode({ children }: OwnProps) {
return (
<EditableCellNormalModeOuterContainer>
<EditableCellNormalModeInnerContainer>
{children}
</EditableCellNormalModeInnerContainer>
</EditableCellNormalModeOuterContainer>
);
}