Skip to content

Commit

Permalink
fix(app): fix tests for createstyles
Browse files Browse the repository at this point in the history
  • Loading branch information
Deahrunt committed Apr 19, 2024
1 parent 82cc18a commit 894144e
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ exports[`@lad-tech/mobydick-core/ChatInput renders correctly 1`] = `
style={
[
{
"alignItems": "center",
"alignItems": undefined,
"backgroundColor": "#EEEFF1",
"borderColor": "rgba(32, 36, 45, 0.3)",
"borderColor": "transparent",
"borderRadius": 12,
"borderWidth": 1.5,
"flexDirection": "row",
Expand Down Expand Up @@ -101,7 +101,7 @@ exports[`@lad-tech/mobydick-core/ChatInput renders correctly 1`] = `
"paddingLeft": 27,
"paddingRight": 24,
"paddingVertical": 18,
"textAlignVertical": undefined,
"textAlignVertical": "top",
},
{
"color": "#20242D",
Expand Down Expand Up @@ -234,9 +234,9 @@ exports[`@lad-tech/mobydick-core/ChatInput renders correctly android 1`] = `
style={
[
{
"alignItems": "center",
"alignItems": undefined,
"backgroundColor": "#EEEFF1",
"borderColor": "rgba(32, 36, 45, 0.3)",
"borderColor": "transparent",
"borderRadius": 12,
"borderWidth": 1.5,
"flexDirection": "row",
Expand Down Expand Up @@ -281,7 +281,7 @@ exports[`@lad-tech/mobydick-core/ChatInput renders correctly android 1`] = `
"paddingLeft": 27,
"paddingRight": 24,
"paddingVertical": 18,
"textAlignVertical": undefined,
"textAlignVertical": "top",
},
[
{
Expand Down Expand Up @@ -419,9 +419,9 @@ exports[`@lad-tech/mobydick-core/ChatInput renders correctly with containerStyle
style={
[
{
"alignItems": "center",
"alignItems": undefined,
"backgroundColor": "#EEEFF1",
"borderColor": "rgba(32, 36, 45, 0.3)",
"borderColor": "transparent",
"borderRadius": 12,
"borderWidth": 1.5,
"flexDirection": "row",
Expand Down Expand Up @@ -466,7 +466,7 @@ exports[`@lad-tech/mobydick-core/ChatInput renders correctly with containerStyle
"paddingLeft": 27,
"paddingRight": 24,
"paddingVertical": 18,
"textAlignVertical": undefined,
"textAlignVertical": "top",
},
{
"color": "#20242D",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ exports[`@lad-tech/mobydick-core/ChatInputField renders correctly 1`] = `
style={
[
{
"alignItems": "center",
"alignItems": undefined,
"backgroundColor": "#EEEFF1",
"borderColor": "rgba(32, 36, 45, 0.3)",
"borderColor": "transparent",
"borderRadius": 12,
"borderWidth": 1.5,
"flexDirection": "row",
Expand Down Expand Up @@ -71,7 +71,7 @@ exports[`@lad-tech/mobydick-core/ChatInputField renders correctly 1`] = `
"paddingLeft": 27,
"paddingRight": 24,
"paddingVertical": 18,
"textAlignVertical": undefined,
"textAlignVertical": "top",
},
{
"color": "#20242D",
Expand Down Expand Up @@ -211,9 +211,9 @@ exports[`@lad-tech/mobydick-core/ChatInputField renders correctly focused/blur 2
style={
[
{
"alignItems": "center",
"alignItems": undefined,
"backgroundColor": "#EEEFF1",
"borderColor": "rgba(32, 36, 45, 0.3)",
"borderColor": "transparent",
"borderRadius": 12,
"borderWidth": 1.5,
"flexDirection": "row",
Expand Down Expand Up @@ -258,7 +258,7 @@ exports[`@lad-tech/mobydick-core/ChatInputField renders correctly focused/blur 2
"paddingLeft": 27,
"paddingRight": 24,
"paddingVertical": 18,
"textAlignVertical": undefined,
"textAlignVertical": "top",
},
{
"color": "#20242D",
Expand Down Expand Up @@ -304,9 +304,9 @@ exports[`@lad-tech/mobydick-core/ChatInputField renders correctly with props 1`]
style={
[
{
"alignItems": "center",
"alignItems": undefined,
"backgroundColor": "#EEEFF1",
"borderColor": "rgba(32, 36, 45, 0.3)",
"borderColor": "transparent",
"borderRadius": 12,
"borderWidth": 1.5,
"flexDirection": "row",
Expand Down Expand Up @@ -354,7 +354,7 @@ exports[`@lad-tech/mobydick-core/ChatInputField renders correctly with props 1`]
"paddingLeft": 27,
"paddingRight": 24,
"paddingVertical": 18,
"textAlignVertical": undefined,
"textAlignVertical": "top",
},
{
"color": "#20242D",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly disabled 2`] = `
style={
[
{
"alignItems": undefined,
"alignItems": "center",
"backgroundColor": "#D1D4DB",
"borderColor": "#D1D4DB",
"borderRadius": 12,
Expand Down Expand Up @@ -252,7 +252,7 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly disabled 2`] = `
"paddingLeft": 27,
"paddingRight": 24,
"paddingVertical": 18,
"textAlignVertical": "top",
"textAlignVertical": undefined,
},
{
"color": "#20242D",
Expand Down Expand Up @@ -285,9 +285,9 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly focused/blur 1`] =
style={
[
{
"alignItems": undefined,
"alignItems": "center",
"backgroundColor": "#EEEFF1",
"borderColor": "transparent",
"borderColor": "rgba(32, 36, 45, 0.3)",
"borderRadius": 12,
"borderWidth": 1.5,
"flexDirection": "row",
Expand Down Expand Up @@ -320,7 +320,7 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly focused/blur 1`] =
"paddingLeft": 27,
"paddingRight": 24,
"paddingVertical": 18,
"textAlignVertical": "top",
"textAlignVertical": undefined,
},
{
"color": "#20242D",
Expand Down Expand Up @@ -539,9 +539,9 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly multiline = true 1
style={
[
{
"alignItems": "center",
"alignItems": undefined,
"backgroundColor": "#EEEFF1",
"borderColor": "rgba(32, 36, 45, 0.3)",
"borderColor": "transparent",
"borderRadius": 12,
"borderWidth": 1.5,
"flexDirection": "row",
Expand Down Expand Up @@ -574,7 +574,7 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly multiline = true 1
"paddingLeft": 27,
"paddingRight": 24,
"paddingVertical": 18,
"textAlignVertical": undefined,
"textAlignVertical": "top",
},
[
{
Expand Down Expand Up @@ -810,7 +810,7 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly valid 2`] = `
style={
[
{
"alignItems": undefined,
"alignItems": "center",
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"borderColor": "#2B78EE",
"borderRadius": 12,
Expand Down Expand Up @@ -845,7 +845,7 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly valid 2`] = `
"paddingLeft": 27,
"paddingRight": 24,
"paddingVertical": 18,
"textAlignVertical": "top",
"textAlignVertical": undefined,
},
{
"color": "#20242D",
Expand Down Expand Up @@ -987,7 +987,7 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly wrong 2`] = `
style={
[
{
"alignItems": undefined,
"alignItems": "center",
"backgroundColor": "rgba(245, 77, 61, 0.15)",
"borderColor": "#F54D3D",
"borderRadius": 12,
Expand Down Expand Up @@ -1022,7 +1022,7 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly wrong 2`] = `
"paddingLeft": 27,
"paddingRight": 24,
"paddingVertical": 18,
"textAlignVertical": "top",
"textAlignVertical": undefined,
},
{
"color": "#20242D",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {disabledStyle, validStyle, wrongStyle} from '../../style';
import {createStyles, IThemeContext, rem} from '../../../styles';

const defaultStyle = createStyles(
({spaces, colors}, multiline: boolean, focused: boolean) => ({
({spaces, colors}, focused: boolean, multiline: boolean) => ({
container: {
minWidth: rem(130),
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/other/components/Dots/Dot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Dot = ({
activeDotColor,
passiveDotColor,
}: IDot): JSX.Element => {
const [styles] = useStyles(stylesCreate, {size});
const [styles] = useStyles(stylesCreate, size);
const {colors} = useTheme();

const backgroundColor = useMemo(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('dots/stylesCreate', () => {
it('must return', () => {
const {result} = renderHook(() => useTheme());

expect(stylesCreate(result.current, {size: 12})).toEqual({
expect(stylesCreate(result.current)).toEqual({
dot: {
width: rem(8),
height: rem(8),
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/other/components/Dots/stylesCreate.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import rem from '../../../styles/utils/rem';
import {createStyles} from '../../../styles';

const stylesCreate = createStyles(({spaces}, {size = spaces.Space8}) => ({
const stylesCreate = createStyles(({spaces}, size: number = spaces.Space8) => ({
dot: {
width: size,
height: size,
Expand Down

0 comments on commit 894144e

Please sign in to comment.