Skip to content

Commit

Permalink
Merge pull request #26 from agrim-deriv/Agrim/DAPI544/quill-ui-button
Browse files Browse the repository at this point in the history
Agrim/dapi544/quill UI
  • Loading branch information
shafin-deriv authored Jun 7, 2024
2 parents d59754b + f3e4571 commit ee8aa11
Show file tree
Hide file tree
Showing 13 changed files with 97 additions and 81 deletions.
4 changes: 3 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
'^.+\\.mjs$': 'babel-jest',
},
transformIgnorePatterns: [
'node_modules/(?!(@docusaurus|swiper|ssr-window|dom7)|@theme|@deriv/quill-design)',
'node_modules/(?!(@docusaurus|swiper|ssr-window|dom7)|@theme|@deriv-com/quill-ui)',
],
moduleNameMapper: {
'@theme/(.*)': '@docusaurus/theme-classic/src/theme/$1',
Expand All @@ -30,7 +30,9 @@ module.exports = {
'@docusaurus/plugin-content-docs/client': '@docusaurus/plugin-content-docs/src/client/index.ts',
'@site/(.*)': '<rootDir>/$1',
'\\.(css|scss|sass|less)$': 'identity-obj-proxy',
'@deriv-com/quill-ui': 'node_modules/@deriv-com/quill-ui/dist/main.js',
},

moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'mjs', 'json'],
rootDir: '.',
roots: ['<rootDir>'],
Expand Down
116 changes: 63 additions & 53 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"format": "prettier --write 'src/**/*.{js,jsx,ts,tsx,md,json}' --config ./.prettierrc"
},
"dependencies": {
"@deriv-com/quill-ui": "^1.9.22",
"@deriv/deriv-api": "^1.0.11",
"@deriv/quill-design": "^1.2.18",
"@deriv/quill-icons": "^1.21.3",
"@deriv/ui": "^0.1.0",
"@docusaurus/core": "^2.4.0",
Expand Down
2 changes: 2 additions & 0 deletions src/components/CustomAccordion/custom-accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

.accordion_header {
display: flex;
overflow-wrap: anywhere;
column-gap: 12px;
background-color: transparent;

[data-state='open'] {
Expand Down
10 changes: 5 additions & 5 deletions src/components/SwipeableBottomSheet/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useRef } from 'react';
import { useDrag } from '@use-gesture/react';
import { a, useSpring, config } from '@react-spring/web';
import { Button } from '@deriv/quill-design';
import { Button } from '@deriv-com/quill-ui';
import './swipeable-bottom-sheet.scss';

type SwipeableBottomSheetProps = {
Expand Down Expand Up @@ -88,8 +88,8 @@ const SwipeableBottomSheet: React.FC<SwipeableBottomSheetProps> = ({
<div className='action_sheet__body__footer'>
{primary_action && (
<Button
colorStyle='black'
size='md'
color='black'
size='lg'
variant='primary'
onClick={primary_action.onClick}
>
Expand All @@ -98,8 +98,8 @@ const SwipeableBottomSheet: React.FC<SwipeableBottomSheetProps> = ({
)}
{secondary_action && (
<Button
colorStyle='black'
size='md'
color='black'
size='lg'
variant='secondary'
onClick={secondary_action.onClick}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
text-align: center;
padding-inline: 16px;
h2 {
margin-bottom: 16px;
margin-bottom: 8px;
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from 'react';
import { Heading, Text } from '@deriv/quill-design';
import { Heading, Text } from '@deriv-com/quill-ui';
import './app-dashboard-container.scss';

const AppDashboardContainer: React.FC = ({ children }) => {
return (
<div className='app_dashboard_container'>
<div className='app_dashboard_container_main'>
<div className='app_dashboard_container_top'>
<Heading.H2>App dashboard</Heading.H2>
<Heading.H2>App Dashboard</Heading.H2>
<Text size='md'>
Start using Deriv API to bring custom integrations and powerful automation to your apps.
</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
margin-inline: 16px;
margin-top: 60px;
max-width: 608px;

&_input {
padding: 16px;
width: 100%;
}
&_form {
display: flex;
justify-content: center;
Expand Down
16 changes: 7 additions & 9 deletions src/features/dashboard/components/AppRegister/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Button, TextField } from '@deriv/quill-design';
import { Button } from '@deriv-com/quill-ui';
import { useForm } from 'react-hook-form';
import { yupResolver } from '@hookform/resolvers/yup';
import './app-register.scss';
Expand Down Expand Up @@ -66,23 +66,21 @@ const AppRegister: React.FC<TAppRegisterProps> = ({ submit }) => {
<div className='app_register_container'>
<div className={`${has_error && 'error-border'} app_register_container__fields`}>
<div className='app_register_container__fields__input'>
<TextField
<input
{...register('name')}
label={`Enter your app's name`}
placeholder={`Enter your app's name`}
inputSize='md'
className='app_register_container_input'
/>
</div>
<div className='app_register_container__fields__button'>
<Button
colorStyle='coral'
size='md'
color='coral'
size='lg'
variant='primary'
role='submit'
disabled={has_error}
>
Register now
</Button>
label='Register now'
></Button>
</div>
</div>
<span className='error'>{errors?.tnc_approval?.message}</span>
Expand Down
8 changes: 4 additions & 4 deletions src/features/dashboard/components/AppsTable/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ApplicationObject } from '@deriv/api-types';
import React, { HTMLAttributes, useCallback, useState } from 'react';
import { Cell, Column } from 'react-table';
import { Button, Heading, Text } from '@deriv/quill-design';
import { Button, Heading, Text } from '@deriv-com/quill-ui';
import { LabelPairedCirclePlusMdRegularIcon } from '@deriv/quill-icons';

import useAppManager from '@site/src/hooks/useAppManager';
Expand Down Expand Up @@ -75,12 +75,12 @@ const AppsTableHeader: React.FC<{
</Text>
</div>
<Button
colorStyle='coral'
size='md'
color='coral'
size='lg'
variant='primary'
role='submit'
iconPosition='start'
icon={LabelPairedCirclePlusMdRegularIcon}
icon={<LabelPairedCirclePlusMdRegularIcon />}
className='apps_table__header__button'
onClick={() => {
updateCurrentTab(TDashboardTab.REGISTER_APP);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import useAppManager from '@site/src/hooks/useAppManager';
import SwipeableBottomSheet from '@site/src/components/SwipeableBottomSheet';
import { Heading } from '@deriv/quill-design';
import { Heading } from '@deriv-com/quill-ui';
import './app-register-success-modal.scss';

interface IAppRegisterSuccessModalProps {
Expand Down
1 change: 0 additions & 1 deletion src/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@use 'src/styles/utility' as *;
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;700&family=Ubuntu:wght@400;500;700&display=swap');
@import '@deriv/quill-design/dist/quill-design.css';

/**
* Any CSS included here will be global. The classic template
Expand Down
6 changes: 4 additions & 2 deletions src/theme/Root.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { ThemeProvider } from '@deriv/ui';
import { ThemeProvider } from '@deriv-com/quill-ui';
import type { ReactNode } from 'react';
import { TrackJS } from 'trackjs';
import siteConfig from '@generated/docusaurus.config';
Expand Down Expand Up @@ -30,7 +30,9 @@ export default function Root({ children }: TRootProps) {
<PlaygroundProvider>
<ApiTokenProvider>
<AppManagerContextProvider>
<ThemeProvider>{children}</ThemeProvider>
<ThemeProvider theme='light' persistent>
{children}
</ThemeProvider>
</AppManagerContextProvider>
</ApiTokenProvider>
</PlaygroundProvider>
Expand Down

0 comments on commit ee8aa11

Please sign in to comment.