Skip to content

Commit

Permalink
Refactor BlockQuote component and update blockquote class
Browse files Browse the repository at this point in the history
  • Loading branch information
kotAPI committed Oct 28, 2023
1 parent 9233d80 commit 911f545
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/components/ui/BlockQuote/BlockQuote.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
'use client';
import React from 'react';

const BlockQuote = ({children}) => (
import {customClassSwitcher} from '@/core';

<blockquote className="rad-ui-blockquote">{children}</blockquote>
);
const COMPONENT_NAME = 'BlockQuote';
const BlockQuote = ({children, customRootClass = '', className = '', ...props}) => {
const rootClass = customClassSwitcher(customRootClass, COMPONENT_NAME);

return <blockquote className={`${rootClass} ${className}`} {...props}>{children}</blockquote>;
};

BlockQuote.displayName = COMPONENT_NAME;

export default BlockQuote;
2 changes: 1 addition & 1 deletion styles/themes/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ button:active, button:focus, input:active, input:focus, textarea:active, textare
background-color: var(--rad-ui-color-accent-500) ;
}

.rad-ui-blockquote{
.rad-ui-block-quote{
border-color: var(--rad-ui-color-accent-600);
border-left-width: 0.5rem;
padding-left:12px;
Expand Down

0 comments on commit 911f545

Please sign in to comment.