Files
twenty/packages/twenty-front/src/modules/settings/components/SettingsEmptyPlaceholder.tsx
T
Neil Kanakia bad488494f Fix dark mode text color on permissions tab empty stat (#19336) (#19340)
Before: black text in dark mode
<img width="1224" height="860" alt="image"
src="https://github.com/user-attachments/assets/a419ef77-9358-4588-ad19-a15b57448682"
/>


After updated styling: the correct grey text in dark mode
<img width="638" height="249" alt="Screenshot 2026-04-05 at 2 47 24 PM"
src="https://github.com/user-attachments/assets/bf736464-d33c-40f1-8244-2cf5d93b7e9c"
/>

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2026-04-05 19:46:10 +00:00

36 lines
964 B
TypeScript

import { styled } from '@linaria/react';
import { type ReactNode } from 'react';
import { themeCssVariables } from 'twenty-ui/theme-constants';
type ThemeSpacingKey = keyof typeof themeCssVariables.spacing;
type SettingsEmptyPlaceholderProps = {
children: ReactNode;
padding?: ThemeSpacingKey;
textAlign?: 'left' | 'center' | 'right';
};
const StyledPlaceholder = styled.div<{
placeholderPadding: string;
placeholderTextAlign: string;
}>`
color: ${themeCssVariables.font.color.tertiary};
padding: ${({ placeholderPadding }) => placeholderPadding};
text-align: ${({ placeholderTextAlign }) => placeholderTextAlign};
`;
export const SettingsEmptyPlaceholder = ({
children,
padding = '8',
textAlign = 'center',
}: SettingsEmptyPlaceholderProps) => {
return (
<StyledPlaceholder
placeholderPadding={themeCssVariables.spacing[padding]}
placeholderTextAlign={textAlign}
>
{children}
</StyledPlaceholder>
);
};