Skip to content

Commit

Permalink
fix(fieldset): fix border styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Bien committed Jan 25, 2021
1 parent 7bdc5ff commit 868f32c
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions src/components/Fieldset/Fieldset.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// ORIGINAL WINDOWS NAME: GROUPBOX
import React from 'react';
import { StyleSheet, View, StyleProp, ViewStyle } from 'react-native';

Expand Down Expand Up @@ -35,14 +36,26 @@ const Fieldset = ({
<Border variant='flat' theme={theme} />
) : (
<>
<Border
variant='well'
invert
<View
style={[
{ marginLeft: 2, marginRight: 2, marginTop: 2, marginBottom: 2 },
styles.border,
{
borderWidth: 4,
borderColor: theme.borderLightest,
},
]}
/>
<View
style={[
styles.border,
{
marginRight: 2,
marginBottom: 2,
borderWidth: 2,
borderColor: theme.borderDark,
},
]}
/>
<Border variant='well' theme={theme} />
</>
)}
{label && (
Expand Down Expand Up @@ -82,6 +95,13 @@ const styles = StyleSheet.create({
fontSize: 16,
lineHeight: 16,
},
border: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
},
});

export default withTheme(Fieldset);

0 comments on commit 868f32c

Please sign in to comment.