Stories
1K Views
40 Downloads - 5 API calls
33 Lines - 537 Bytes
Apr 23, 2020 design interface
1 .gg-stories,
2 .gg-stories::after ,
3 .gg-stories::before { 4 display: block;
5 box-sizing: border-box;
6 border-radius: 3px 7 } 8 9 .gg-stories { 10 position: relative;
11 transform: scale(var(--ggs,1 ));
12 width: 12px ;
13 height: 16px ;
14 border: 2px solid
15 } 16 17 .gg-stories::after ,
18 .gg-stories::before { 19 content: "";
20 position: absolute;
21 background: currentColor;
22 width: 2px ;
23 height: 14px ;
24 top: -1px 25 } 26 27 .gg-stories::before { 28 left: -6px 29 } 30 31 .gg-stories::after { 32 right: -6px 33 }
1 <svg 2 width="24 " 3 height="24 " 4 viewBox="0 0 24 24 " 5 fill="none" 6 xmlns="http://www.w3 .org/2000 /svg" 7 > 8 <path 9 fill-rule="evenodd" 10 clip-rule="evenodd" 11 d="M15 6 H9 C8.44772 6 8 6.44772 8 7 V17 C8 17.5523 8.44772 18 9 18 H15 C15.5523 18 16 17.5523 16 17 V7 C16 6.44772 15.5523 6 15 6 ZM9 4 C7.34315 4 6 5.34315 6 7 V17 C6 18.6569 7.34315 20 9 20 H15 C16.6569 20 18 18.6569 18 17 V7 C18 5.34315 16.6569 4 15 4 H9 Z" 12 fill="currentColor" 13 /> 14 <path 15 d="M2 6 C2 5.44772 2.44772 5 3 5 C3.55228 5 4 5.44772 4 6 V18 C4 18.5523 3.55228 19 3 19 C2.44772 19 2 18.5523 2 18 V6 Z" 16 fill="currentColor" 17 /> 18 <path 19 d="M20 6 C20 5.44772 20.4477 5 21 5 C21.5523 5 22 5.44772 22 6 V18 C22 18.5523 21.5523 19 21 19 C20.4477 19 20 18.5523 20 18 V6 Z" 20 fill="currentColor" 21 /> 22 </svg>
1 import React from 'react' 2 import styled from 'styled-components' 3 4 const StyledStories = styled.i` 5 &, 6 &::after , 7 &::before { 8 display: block;9 box-sizing: border-box;10 border-radius: 3px ;11 } 12 & { 13 position: relative;14 transform: scale(var(--ggs, 1 ));15 width: 12px ;16 height: 16px ;17 border: 2px solid;18 } 19 &::after , 20 &::before { 21 content: '';22 position: absolute;23 background: currentColor;24 width: 2px ;25 height: 14px ;26 top: -1px ;27 } 28 &::before { 29 left: -6px ;30 } 31 &::after { 32 right: -6px ;33 } 34 ` 35 36 export const Stories = React.forwardRef<HTMLElement, React.HTMLAttributes<HTMLElement>>( 37 (props, ref) => { 38 return ( 39 <> 40 <StyledStories { ...props} ref={ ref} icon-role="stories" /> 41 </> 42 ) 43 } , 44 ) 45
Stories is a wonderful pure CSS icon built by adopting attributes like: .gg-stories, border-radius, transform, width, height, border, background, .gg-stories, Fun facts, it has: 33 Lines of code at 537b & 388b minified. Quite wonderful 🤗 .