WIP Label

This commit is contained in:
Rodrigo Antinarelli authored and James A. Petts committed 2020-05-15 13:18:34 +02:00
1 parent 7617a8b9ee
commit c68d0173df
2 files changed
+8 -8

No files matched your search

+5 -7
View File
@@ -2,7 +2,7 @@ import React from 'react';
import t from 'prop-types';
const Label = ({ children, spacing, className, text, ...rest }) => {
const baseClasses = 'block text-gray-700 text-sm font-bold';
const baseClasses = 'flex flex-1 flex-col text-gray-700 text-sm font-bold';
const getClasses = () => {
const classes = [];
@@ -12,12 +12,10 @@ const Label = ({ children, spacing, className, text, ...rest }) => {
};
return (
<div>
<label className={getClasses()}>
{text}
{children}
</label>
</div>
<label className={getClasses()}>
{text}
{children}
</label>
);
};
+3 -1
View File
@@ -16,5 +16,7 @@ import Label from './';
## Basic usage
<Playground>
<Label text="Label" />
{() => {
return <Label text="Label" />;
}}
</Playground>