Skip to content

Commit

Permalink
chore(AISkeleton): rename AiSkeleton to AISkeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
tw15egan committed Jun 17, 2024
1 parent 2cc3067 commit 71504ef
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 93 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

import React from 'react';

import AiSkeletonIcon from './AiSkeletonIcon';
import AISkeletonIcon from './AISkeletonIcon';

export default {
title: 'Experimental/unstable__AiSkeleton/AiSkeletonIcon',
component: AiSkeletonIcon,
title: 'Components/Skeleton',
component: AISkeletonIcon,
};

const propsSkeleton = {
Expand All @@ -30,9 +30,9 @@ const propsSkeleton2 = {
},
};

export const Default = () => (
export const _AISkeletonIcon = () => (
<>
<AiSkeletonIcon {...propsSkeleton} />
<AiSkeletonIcon {...propsSkeleton2} />
<AISkeletonIcon {...propsSkeleton} />
<AISkeletonIcon {...propsSkeleton2} />
</>
);
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import classNames from 'classnames';
import { usePrefix } from '../../internal/usePrefix';
import { SkeletonIcon } from '../SkeletonIcon';

interface AiSkeletonIconProps {
interface AISkeletonIconProps {
/**
* Specify an optional className to add.
*/
Expand All @@ -23,16 +23,16 @@ interface AiSkeletonIconProps {
style?: React.CSSProperties;
}

const AiSkeletonIcon = ({ className, ...rest }: AiSkeletonIconProps) => {
const AISkeletonIcon = ({ className, ...rest }: AISkeletonIconProps) => {
const prefix = usePrefix();
const AiSkeletonIconClasses = classNames(className, {
const AISkeletonIconClasses = classNames(className, {
[`${prefix}--skeleton__icon--ai`]: true,
});

return <SkeletonIcon className={AiSkeletonIconClasses} {...rest} />;
return <SkeletonIcon className={AISkeletonIconClasses} {...rest} />;
};

AiSkeletonIcon.propTypes = {
AISkeletonIcon.propTypes = {
/**
* Specify an optional className to add.
*/
Expand All @@ -44,4 +44,4 @@ AiSkeletonIcon.propTypes = {
style: PropTypes.object,
};

export default AiSkeletonIcon;
export default AISkeletonIcon;
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@

import React from 'react';

import AiSkeletonPlaceholder from './AiSkeletonPlaceholder';
import AISkeletonPlaceholder from './AISkeletonPlaceholder';

export default {
title: 'Experimental/unstable__AiSkeleton/AiSkeletonPlaceholder',
component: AiSkeletonPlaceholder,
title: 'Components/Skeleton',
component: AISkeletonPlaceholder,
};

export const Default = () => <AiSkeletonPlaceholder className="test" />;
export const _AISkeletonPlaceholder = () => (
<AISkeletonPlaceholder className="test" />
);
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,34 @@ import classNames from 'classnames';
import { usePrefix } from '../../internal/usePrefix';
import { SkeletonPlaceholder } from '../SkeletonPlaceholder';

export interface AiSkeletonPlaceholderProps {
export interface AISkeletonPlaceholderProps {
/**
* Add a custom class to the component to set the height and width
*/
className?: string;
}

const AiSkeletonPlaceholder = ({
const AISkeletonPlaceholder = ({
className,
...other
}: AiSkeletonPlaceholderProps) => {
}: AISkeletonPlaceholderProps) => {
const prefix = usePrefix();
const AiSkeletonPlaceholderClasses = classNames(
const AISkeletonPlaceholderClasses = classNames(
{ className, [`${prefix}--skeleton__placeholder--ai`]: true },
className
);

return (
<SkeletonPlaceholder className={AiSkeletonPlaceholderClasses} {...other} />
<SkeletonPlaceholder className={AISkeletonPlaceholderClasses} {...other} />
);
};

AiSkeletonPlaceholder.propTypes = {
AISkeletonPlaceholder.propTypes = {
/**
* Add a custom class to the component
* to set the height and width
*/
className: PropTypes.string,
};

export default AiSkeletonPlaceholder;
export default AISkeletonPlaceholder;
19 changes: 19 additions & 0 deletions packages/react/src/components/AISkeleton/AISkeletonText.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright IBM Corp. 2016, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

/* eslint-disable no-console */

import React from 'react';

import AISkeletonText from './AISkeletonText';

export default {
title: 'Components/Skeleton',
component: AISkeletonText,
};

export const _AISkeletonText = () => <AISkeletonText />;
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import classNames from 'classnames';
import { usePrefix } from '../../internal/usePrefix';
import { SkeletonText } from '../SkeletonText';

interface AiSkeletonTextProps {
interface AISkeletonTextProps {
/**
* Specify an optional className to be applied to the container node.
*/
Expand All @@ -38,7 +38,7 @@ interface AiSkeletonTextProps {
width?: string;
}

const AiSkeletonText = ({ className, ...rest }: AiSkeletonTextProps) => {
const AISkeletonText = ({ className, ...rest }: AISkeletonTextProps) => {
const prefix = usePrefix();
const aiSkeletonTextClasses = classNames(className, {
[`${prefix}--skeleton__text--ai`]: true,
Expand All @@ -47,7 +47,7 @@ const AiSkeletonText = ({ className, ...rest }: AiSkeletonTextProps) => {
return <SkeletonText className={aiSkeletonTextClasses} {...rest} />;
};

AiSkeletonText.propTypes = {
AISkeletonText.propTypes = {
/**
* Specify an optional className to be applied to the container node
*/
Expand All @@ -70,4 +70,4 @@ AiSkeletonText.propTypes = {
width: PropTypes.string,
};

export default AiSkeletonText;
export default AISkeletonText;
12 changes: 12 additions & 0 deletions packages/react/src/components/AISkeleton/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* Copyright IBM Corp. 2016, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

import AISkeletonPlaceholder from './AISkeletonPlaceholder';
import AISkeletonIcon from './AISkeletonIcon';
import AISkeletonText from './AISkeletonText';

export { AISkeletonText, AISkeletonIcon, AISkeletonPlaceholder };
54 changes: 0 additions & 54 deletions packages/react/src/components/AiSkeleton/AiSkeletonText.stories.js

This file was deleted.

12 changes: 0 additions & 12 deletions packages/react/src/components/AiSkeleton/index.tsx

This file was deleted.

0 comments on commit 71504ef

Please sign in to comment.