Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
TannerS committed Oct 7, 2022
1 parent 12f3a72 commit c8c35f9
Show file tree
Hide file tree
Showing 14 changed files with 867 additions and 1,561 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import React from 'react';

import FormLabel from './FormLabel';
import { Tooltip } from '../Tooltip/next/Tooltip';
import { Tooltip } from '../Tooltip/Tooltip';
import { Information } from '@carbon/icons-react';
import { ActionableNotification } from '../Notification';
import { Toggletip, ToggletipButton, ToggletipContent } from '../Toggletip';
Expand Down
20 changes: 7 additions & 13 deletions packages/react/src/components/Tabs/Tabs.Skeleton.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,22 @@ import { usePrefix } from '../../internal/usePrefix';
function Tab() {
const prefix = usePrefix();
return (
<li className={`${prefix}--tabs--scrollable__nav-item`}>
<li className={`${prefix}--tabs__nav-item`}>
<div className={`${prefix}--tabs__nav-link`}>
<span></span>
</div>
</li>
);
}

function TabsSkeleton({ className, type, ...rest }) {
function TabsSkeleton({ className, contained, ...rest }) {
const prefix = usePrefix();
const tabClasses = cx(
className,
`${prefix}--tabs`,
`${prefix}--skeleton`,
`${prefix}--tabs--scrollable`,
{
[`${prefix}--tabs--scrollable--container`]: type === 'container',
}
);
const tabClasses = cx(className, `${prefix}--tabs`, `${prefix}--skeleton`, {
[`${prefix}--tabs--contained`]: contained,
});
return (
<div className={tabClasses} {...rest}>
<ul className={`${prefix}--tabs--scrollable__nav`}>
<ul className={`${prefix}--tabs__nav`}>
{Tab()}
{Tab()}
{Tab()}
Expand All @@ -54,7 +48,7 @@ TabsSkeleton.propTypes = {
/**
* Provide the type of Tab
*/
type: PropTypes.oneOf(['', 'default', 'container']),
contained: PropTypes.bool,
};

export default TabsSkeleton;

0 comments on commit c8c35f9

Please sign in to comment.