Skip to content

Commit

Permalink
test: Demo ability to style and overwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Anton committed May 30, 2024
1 parent 118d083 commit 1a29879
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions apps/web/src/pages/settings/SettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { ROUTES } from '../../constants/routes.enum';
import { useAuth } from '@novu/shared-web';
import { When, colors, useTabsStyles } from '@novu/design-system';
import { useFeatureFlag } from '../../hooks';
import { Test } from '@novu/novui';
import { css } from '@novu/novui/css';

const SettingsPageWrapper = ({ children }: { children: React.ReactNode }) => {
return (
Expand Down Expand Up @@ -54,6 +56,11 @@ export function SettingsPage() {

return (
<SettingsPageWrapper>
<Test
onClick={() => alert('GZH')}
className={css({ fontWeight: 'strong', color: 'typography.text.feedback.info', borderRadius: '150' })}
/>

<Tabs
orientation="horizontal"
keepMounted={true}
Expand Down
6 changes: 4 additions & 2 deletions libs/novui/src/components/Test.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { FC, MouseEventHandler } from 'react';
import { Button as ExternalButton } from '@mantine/core';
import { css } from '../../styled-system/css';
import { CoreProps } from '../types';

interface ITestProps {
interface ITestProps extends CoreProps {
onClick: MouseEventHandler<HTMLButtonElement>;
}

export const Test: FC<ITestProps> = ({ onClick }) => {
export const Test: FC<ITestProps> = ({ onClick, className }) => {
return (
<ExternalButton
onClick={onClick}
leftSection={'hello'}
className={className}
classNames={{
root: css({
color: 'typography.text.feedback.alert',
Expand Down

0 comments on commit 1a29879

Please sign in to comment.