UNPKG

@zendeskgarden/react-forms

Version:

Components relating to form elements in the Garden Design System

38 lines (35 loc) 1.13 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 { StyledBaseIcon, componentStyles, getColor } from '@zendeskgarden/react-theming'; const COMPONENT_ID$f = 'forms.file.icon'; const colorStyles$5 = ({ theme, $validation }) => { const color = $validation ? undefined : getColor({ theme, variable: 'foreground.subtle' }); return css(["color:", ";"], color); }; const sizeStyles$9 = ({ $isCompact, theme }) => { const width = $isCompact ? theme.iconSizes.sm : theme.iconSizes.md; const margin = `${theme.space.base * 2}px`; return css(["width:", ";margin-", ":", ";"], width, theme.rtl ? 'left' : 'right', margin); }; const StyledFileIcon = styled(StyledBaseIcon).attrs({ 'data-garden-id': COMPONENT_ID$f, 'data-garden-version': '9.12.6' }).withConfig({ displayName: "StyledFileIcon", componentId: "sc-7b3q0c-0" })(["flex-shrink:0;", ";", ";", ";"], sizeStyles$9, colorStyles$5, componentStyles); export { StyledFileIcon };