UNPKG

@zendeskgarden/react-typography

Version:

Components relating to typography in the Garden Design System

33 lines (30 loc) 1.08 kB
/** * Copyright Zendesk, Inc. * * Use of this source code is governed under the Apache License, Version 2.0 * found at http://www.apache.org/licenses/LICENSE-2.0. */ import styled, { css } from 'styled-components'; import { componentStyles, getColor } from '@zendeskgarden/react-theming'; const COMPONENT_ID$7 = 'typography.codeblock'; const colorStyles$2 = ({ theme }) => { const backgroundColor = getColor({ theme, variable: 'background.recessed' }); const foregroundColor = getColor({ theme, variable: 'foreground.default' }); return css(["background-color:", ";color:", ";"], backgroundColor, foregroundColor); }; const StyledCodeBlock = styled.pre.attrs({ 'data-garden-id': COMPONENT_ID$7, 'data-garden-version': '9.13.0' }).withConfig({ displayName: "StyledCodeBlock", componentId: "sc-5wky57-0" })(["display:table;margin:0;padding:", "px;box-sizing:border-box;width:100%;direction:ltr;white-space:pre;counter-reset:linenumber;", ";", ";"], props => props.theme.space.base * 3, colorStyles$2, componentStyles); export { StyledCodeBlock };