mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 04:26:23 +08:00
13 lines
352 B
TypeScript
13 lines
352 B
TypeScript
import { AlignStyle } from '@toeverything/components/board-types';
|
|
|
|
const ALIGN_VALUES = {
|
|
[AlignStyle.Start]: 'left',
|
|
[AlignStyle.Middle]: 'center',
|
|
[AlignStyle.End]: 'right',
|
|
[AlignStyle.Justify]: 'justify',
|
|
} as const;
|
|
|
|
export function getTextAlign(alignStyle: AlignStyle = AlignStyle.Start) {
|
|
return ALIGN_VALUES[alignStyle];
|
|
}
|