From 3dfef42efd4bd92ec0b44fd1f61807736d842b0e Mon Sep 17 00:00:00 2001 From: William Niemiec Date: Wed, 11 Aug 2021 12:19:11 -0300 Subject: [PATCH] App stoped - fixed --- README.md | 4 ++-- src/FullTooltip/index.js | 14 +++++++------- src/FullTooltip/styles.js | 3 +++ .../components/Rectangle/index.js | 4 ++-- .../components/Rectangle/styles.js | 0 src/{FullTooltip => }/components/Triangle/index.js | 4 ++-- .../components/Triangle/styles.js | 0 7 files changed, 16 insertions(+), 13 deletions(-) rename src/{FullTooltip => }/components/Rectangle/index.js (73%) rename src/{FullTooltip => }/components/Rectangle/styles.js (100%) rename src/{FullTooltip => }/components/Triangle/index.js (74%) rename src/{FullTooltip => }/components/Triangle/styles.js (100%) diff --git a/README.md b/README.md index fadb1ef..28146bc 100644 --- a/README.md +++ b/README.md @@ -68,8 +68,8 @@ const image = { uri: "https://reactjs.org/logo-og.png" }; | Property |Type|Description|Default| |----------------|-------------------------------|-----------------------------|--------| |display |`boolean`|Tooltip content | `true` | -|selected |`bool`|Custom style | `null` | -|fgColor |`string`|Text color |`"rgba(0, 0, 0, 0.7)"`| +|style |`bool`|Custom style | `null` | +|bgColor |`string`|Background color |`"rgba(0, 0, 0, 0.7)"`| ## 🚩 Changelog Details about each version are documented in the [releases section](https://github.com/wniemiec-component-reactnative/full-tooltip/releases). diff --git a/src/FullTooltip/index.js b/src/FullTooltip/index.js index 24ddda2..1622e84 100644 --- a/src/FullTooltip/index.js +++ b/src/FullTooltip/index.js @@ -11,8 +11,8 @@ import React from 'react'; import { View } from 'react-native'; import styles from './styles'; -import Triangle from './components/Triangle'; -import Rectangle from './components/Rectangle'; +import Triangle from '../components/Triangle'; +import Rectangle from '../components/Rectangle'; /** * Full-width tooltip. @@ -20,19 +20,19 @@ import Rectangle from './components/Rectangle'; * @param {object} children Tooltip content * @param {boolean} [display=true] Indicates whether the tooltip should be displayed * @param {object} [style=null] Custom style - * @param {string} [fgColor='rgba(0, 0, 0, 0.7)'] Text color + * @param {string} [bgColor='rgba(0, 0, 0, 0.7)'] Background color */ export default function FullTooltip({ children, display=true, style=null, - fgColor='rgba(0, 0, 0, 0.7)' + bgColor='rgba(0, 0, 0, 0.7)' }) { return ( - - - + + + {children} diff --git a/src/FullTooltip/styles.js b/src/FullTooltip/styles.js index 7469e3a..a25791d 100644 --- a/src/FullTooltip/styles.js +++ b/src/FullTooltip/styles.js @@ -5,5 +5,8 @@ export default StyleSheet.create({ width: '100%', justifyContent: "center", alignItems: 'center' + }, + hide: { + transform: [{ scale: 0 }] } }); diff --git a/src/FullTooltip/components/Rectangle/index.js b/src/components/Rectangle/index.js similarity index 73% rename from src/FullTooltip/components/Rectangle/index.js rename to src/components/Rectangle/index.js index dba9519..c63f6c7 100644 --- a/src/FullTooltip/components/Rectangle/index.js +++ b/src/components/Rectangle/index.js @@ -12,9 +12,9 @@ import React from 'react'; import { View } from 'react-native'; import styles from './styles'; -export default function Rectangle({ children, fgColor }) { +export default function Rectangle({ children, bgColor }) { return ( - + {children} ); diff --git a/src/FullTooltip/components/Rectangle/styles.js b/src/components/Rectangle/styles.js similarity index 100% rename from src/FullTooltip/components/Rectangle/styles.js rename to src/components/Rectangle/styles.js diff --git a/src/FullTooltip/components/Triangle/index.js b/src/components/Triangle/index.js similarity index 74% rename from src/FullTooltip/components/Triangle/index.js rename to src/components/Triangle/index.js index 361e0d7..78abb51 100644 --- a/src/FullTooltip/components/Triangle/index.js +++ b/src/components/Triangle/index.js @@ -12,9 +12,9 @@ import React from 'react'; import { View } from 'react-native'; import styles from './styles'; -export default function Triangle({ fgColor }) { +export default function Triangle({ bgColor }) { return ( - + ); } diff --git a/src/FullTooltip/components/Triangle/styles.js b/src/components/Triangle/styles.js similarity index 100% rename from src/FullTooltip/components/Triangle/styles.js rename to src/components/Triangle/styles.js