forked from sombochea/verdaccio-ui
initial commit
This commit is contained in:
14
src/components/Tag/index.js
Normal file
14
src/components/Tag/index.js
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* @prettier
|
||||
* @flow
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import type { Element } from 'react';
|
||||
|
||||
import { IProps } from './types';
|
||||
import { Wrapper } from './styles';
|
||||
|
||||
const Tag = ({ children }: IProps): Element<Wrapper> => <Wrapper>{children}</Wrapper>;
|
||||
|
||||
export default Tag;
|
||||
20
src/components/Tag/styles.js
Normal file
20
src/components/Tag/styles.js
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* @prettier
|
||||
* @flow
|
||||
*/
|
||||
|
||||
import styled from 'react-emotion';
|
||||
import { ellipsis } from '../../utils/styles/mixings';
|
||||
|
||||
export const Wrapper = styled.span`
|
||||
&& {
|
||||
vertical-align: middle;
|
||||
line-height: 22px;
|
||||
border-radius: 2px;
|
||||
color: #9f9f9f;
|
||||
background-color: hsla(0, 0%, 51%, 0.1);
|
||||
padding: 0.22rem 0.4rem;
|
||||
margin: 5px 10px 0 0;
|
||||
${ellipsis('300px')};
|
||||
}
|
||||
`;
|
||||
9
src/components/Tag/types.js
Normal file
9
src/components/Tag/types.js
Normal file
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* @prettier
|
||||
* @flow
|
||||
*/
|
||||
import type { Node } from 'react';
|
||||
|
||||
export interface IProps {
|
||||
children: Node;
|
||||
}
|
||||
Reference in New Issue
Block a user