UNPKG

@neo4j-ndl/react

Version:

React implementation of Neo4j Design System

55 lines 2.06 kB
import { jsx as _jsx } from "react/jsx-runtime"; /** * * Copyright (c) "Neo4j" * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ import { tokens } from '@neo4j-ndl/base'; import { Box, Flex } from '@neo4j-ndl/react'; const Tiles = ` linear-gradient( 45deg, var(--theme-color-neutral-bg-strong) 25%, transparent 25% ), linear-gradient( 135deg, var(--theme-color-neutral-bg-strong) 25%, transparent 25% ), linear-gradient( 45deg, transparent 75%, var(--theme-color-neutral-bg-strong) 75% ), linear-gradient( 135deg, transparent 75%, var(--theme-color-neutral-bg-strong) 75% ) `; const TiledTransparentBackground = { backgroundColor: 'white', backgroundImage: Tiles, backgroundPosition: '0px 0px, 10px 0px, 10px -10px, 0px 10px', backgroundSize: '20px 20px', border: '1px solid var(--theme-color-neutral-border-weak)', }; const component = () => (_jsx(Flex, { style: Object.assign(Object.assign({}, TiledTransparentBackground), { borderRadius: tokens.borderRadius['xl'], padding: tokens.space['12'] }), children: Array.from({ length: 3 }).map((_, i) => (_jsx(Box, { borderRadius: "xl", style: { height: '80px', minWidth: '240px' }, className: "n-bg-primary-bg-weak n-border n-border-primary-border-strong" }, `box-${i}`))) })); export default component; //# sourceMappingURL=flex-default.story.js.map