import * as React from "react"; import * as Strings from "~/common/strings"; import * as Constants from "~/common/constants"; import * as SVG from "~/common/svg"; import { css } from "@emotion/react"; import { LoaderSpinner } from "~/components/system/components/Loaders"; const STYLES_SLATE_NAME = css` overflow: hidden; text-overflow: ellipsis; font-family: ${Constants.font.medium}; `; const STYLES_SLATE_LIST = css` max-height: 400px; overflow-y: scroll; `; const STYLES_SLATE_LINE = css` display: flex; align-items: center; width: 100%; padding: 12px 16px; background-color: ${Constants.system.white}; margin-bottom: 1px; cursor: pointer; color: ${Constants.system.darkGray}; :hover { color: ${Constants.system.black} !important; } `; const STYLES_ICON_BOX = css` display: flex; align-items: center; `; export class SlatePicker extends React.Component { render() { return (
Create new slate
{this.props.slates.map((slate) => (
this.props.onAdd(slate)} >
{this.props.loading && this.props.loading.id && this.props.loading.id === slate.id ? ( ) : this.props.selected[slate.id] ? ( ) : ( )}
{slate.data.name || slate.slatename}
))}
); } }