packages/remirror__react-components/src/button-groups/text-alignment-button-group.tsx
import React, { FC, ReactNode } from 'react';
import {
CenterAlignButton,
JustifyAlignButton,
LeftAlignButton,
RightAlignButton,
} from '../buttons';
import { CommandButtonGroup } from './command-button-group';
export interface TextAlignmentButtonGroupProps {
showAll?: boolean;
children?: ReactNode | ReactNode[];
}
export const TextAlignmentButtonGroup: FC<TextAlignmentButtonGroupProps> = ({
showAll = false,
children,
}) => (
<CommandButtonGroup>
<LeftAlignButton />
<CenterAlignButton />
<RightAlignButton />
{showAll && <JustifyAlignButton />}
{children}
</CommandButtonGroup>
);