@zendeskgarden/react-chrome
Version:
Components relating to Chrome within the Garden Design System.
32 lines (29 loc) • 1.1 kB
JavaScript
/**
* 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 SvgLinkStroke from '../node_modules/@zendeskgarden/svg-icons/src/16/link-stroke.svg.js';
import { getColor, componentStyles } from '@zendeskgarden/react-theming';
const COMPONENT_ID = 'chrome.skipnav_icon';
const sizeStyles = _ref => {
let {
theme
} = _ref;
const margin = `${theme.space.base * 2}px`;
const size = theme.iconSizes.md;
return css(["margin-", ":", ";width:", ";height:", ";"], theme.rtl ? 'left' : 'right', margin, size, size);
};
const StyledSkipNavIcon = styled(SvgLinkStroke).attrs({
'data-garden-id': COMPONENT_ID,
'data-garden-version': '9.5.3'
}).withConfig({
displayName: "StyledSkipNavIcon",
componentId: "sc-1ika5z4-0"
})(["transform:", ";color:", ";", ";", ";"], p => p.theme.rtl && 'scaleX(-1)', p => getColor({
theme: p.theme,
variable: 'foreground.subtle'
}), sizeStyles, componentStyles);
export { StyledSkipNavIcon };