Merge branch 'canon-props-restructure' into canon-flex
This commit is contained in:
@@ -14,8 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
'use client';
|
||||
|
||||
import React, { forwardRef } from 'react';
|
||||
import { Icon } from '../Icon';
|
||||
import clsx from 'clsx';
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
'use client';
|
||||
|
||||
import React, { forwardRef } from 'react';
|
||||
import clsx from 'clsx';
|
||||
import { useResponsiveValue } from '../../hooks/useResponsiveValue';
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
'use client';
|
||||
|
||||
import React from 'react';
|
||||
import { useCanon } from '../../contexts/canon';
|
||||
import type { IconProps } from './types';
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
'use client';
|
||||
|
||||
import React, { ElementRef, forwardRef } from 'react';
|
||||
import { Input as InputPrimitive } from '@base-ui-components/react/input';
|
||||
import clsx from 'clsx';
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
'use client';
|
||||
|
||||
import React, { forwardRef } from 'react';
|
||||
import { useResponsiveValue } from '../../hooks/useResponsiveValue';
|
||||
import clsx from 'clsx';
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
'use client';
|
||||
|
||||
import React, { createContext, ReactNode, useContext } from 'react';
|
||||
import { icons } from '../components/Icon/icons';
|
||||
import { IconMap, IconNames } from '../components/Icon/types';
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export function extractProps(
|
||||
props: {
|
||||
className?: string;
|
||||
@@ -27,9 +28,6 @@ export function extractProps(
|
||||
let style: React.CSSProperties = props.style || {};
|
||||
|
||||
for (const key in propDefs) {
|
||||
if (key === 'gap') {
|
||||
console.log(key, propDefs[key]);
|
||||
}
|
||||
// Check if the prop is present or has a default value
|
||||
if (
|
||||
!props.hasOwnProperty(key) &&
|
||||
@@ -46,10 +44,6 @@ export function extractProps(
|
||||
const propDefsClassName = propDefs[key].className;
|
||||
const isResponsive = propDefs[key].responsive;
|
||||
|
||||
if (key === 'gap') {
|
||||
console.log('coco', key, propDefs[key], value);
|
||||
}
|
||||
|
||||
const handleValue = (val: any, prefix: string = '') => {
|
||||
if (propDefsValues.includes(val)) {
|
||||
className += ` ${prefix}${propDefsClassName}-${val}`;
|
||||
|
||||
Reference in New Issue
Block a user