Skip to content

Commit

Permalink
4.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nandorojo committed May 16, 2023
1 parent 9d40949 commit b5dfbbd
Show file tree
Hide file tree
Showing 12 changed files with 51 additions and 16 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [4.3.0](https://github.com/nandorojo/dripsy/compare/v4.2.0...v4.3.0) (2023-05-16)

**Note:** Version bump only for package dripsy





# [4.2.0](https://github.com/nandorojo/dripsy/compare/v4.1.0...v4.2.0) (2023-05-16)

**Note:** Version bump only for package dripsy
Expand Down
11 changes: 11 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = function (api) {
api.cache(true)

// only used for jest, right?
return {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
'@babel/preset-typescript',
],
}
}
8 changes: 8 additions & 0 deletions examples/next-example/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [4.3.0](https://github.com/nandorojo/dripsy/compare/v4.2.0...v4.3.0) (2023-05-16)

**Note:** Version bump only for package next-dripsy-example





# [4.2.0](https://github.com/nandorojo/dripsy/compare/v4.1.0...v4.2.0) (2023-05-16)

**Note:** Version bump only for package next-dripsy-example
Expand Down
2 changes: 1 addition & 1 deletion examples/next-example/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next-dripsy-example",
"version": "4.2.0",
"version": "4.3.0",
"main": "__generated__/AppEntry.js",
"dependencies": {
"expo": "^40.0.0",
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"npmClient": "yarn",
"useWorkspaces": true,
"version": "4.2.0",
"version": "4.3.0",
"command": {
"publish": {
"allowBranch": "master",
Expand Down
8 changes: 8 additions & 0 deletions packages/dripsy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [4.3.0](https://github.com/nandorojo/dripsy/compare/v4.2.0...v4.3.0) (2023-05-16)

**Note:** Version bump only for package dripsy





# [4.2.0](https://github.com/nandorojo/dripsy/compare/v4.1.0...v4.2.0) (2023-05-16)

**Note:** Version bump only for package dripsy
Expand Down
7 changes: 0 additions & 7 deletions packages/dripsy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@
"url": "https://github.com/nandorojo/dripsy/issues"
},
"homepage": "https://github.com/nandorojo/dripsy#readme",
"jest": {
"preset": "react-native",
"modulePathIgnorePatterns": [
"<rootDir>/example/node_modules",
"<rootDir>/lib/"
]
},
"eslintIgnore": [
"node_modules/",
"lib/"
Expand Down
1 change: 0 additions & 1 deletion packages/dripsy/src/core/__tests__/index.test.tsx

This file was deleted.

5 changes: 3 additions & 2 deletions packages/dripsy/src/core/components/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { createThemedComponent } from '../css/create-themed-component'
import { defaultFontStyle } from './defaultStyle'
import { useDripsyTheme } from '../use-dripsy-theme'
import { ColorPath, StyledProps } from '../types-v2/sx'
import { get } from '../css/get'

const DripsyInput = createThemedComponent(rTextInput, {
themeKey: 'forms',
Expand Down Expand Up @@ -34,8 +35,8 @@ export const TextInput = forwardRef<rTextInput, DripsyTextInputProps>(
function TextInput({ ...props }, ref) {
const { theme } = useDripsyTheme()
Object.keys(colorKeys).forEach((key) => {
if (props[key] && theme?.colors && key in theme.colors) {
props[key] = theme.colors[props[key]]
if (props[key] && theme?.colors) {
props[key] = get(theme.colors, props[key] as string) ?? props[key]
}
})
return <DripsyInput {...props} ref={ref} />
Expand Down
5 changes: 3 additions & 2 deletions packages/dripsy/src/core/components/activity-indicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useDripsyTheme } from '../use-dripsy-theme'
import { useSx } from '../use-sx'
import { ColorPath, SxProp } from '../types-v2/sx'
import { DripsyBaseTheme, DripsyFinalTheme } from '../types-v2/declarations'
import { get } from '../css/get'

type Props<Theme extends DripsyBaseTheme = DripsyFinalTheme> = Omit<
ComponentProps<typeof NativeActivityIndicator>,
Expand All @@ -17,8 +18,8 @@ function Indicator(props: Props & { sx?: SxProp }) {
const sx = useSx()

let { color } = props
if (typeof color === 'string' && colors?.[color]) {
color = colors[color] as string
if (typeof color === 'string' && colors) {
color = get(colors, color) ?? color
}
return (
<NativeActivityIndicator
Expand Down
5 changes: 5 additions & 0 deletions packages/dripsy/src/core/css/get.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { get } from './get'

describe('get', () => {
expect(get({ hi: { hey: true } }, 'hi.hey')).toEqual(true)
})
5 changes: 3 additions & 2 deletions packages/dripsy/src/gradient/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
DripsyBaseTheme,
ColorPath,
} from '../core'
import { get } from '../core/css/get'

type Props<Theme extends DripsyBaseTheme = DripsyFinalTheme> = Omit<
React.ComponentProps<typeof ExpoLinearGradient>,
Expand All @@ -31,8 +32,8 @@ const Grad = styled(
const colorArrayToTheme = (colorArray: typeof colors) => {
// Return an empty array if the colors come back as undefined
return (
colorArray?.map(
(color) => (themeColors?.[color] as string) ?? color
colorArray?.map((color) =>
themeColors ? get(themeColors, color) : color
) ?? []
)
}
Expand Down

1 comment on commit b5dfbbd

@vercel
Copy link

@vercel vercel bot commented on b5dfbbd May 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.