Skip to content

Commit

Permalink
fix(components): move CSS imports out of index files
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyperkid123 committed Feb 1, 2021
1 parent 0a103a8 commit c9abd9f
Show file tree
Hide file tree
Showing 31 changed files with 15 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { FilterIcon } from '@patternfly/react-icons';
import Text from './TextFilter';
import { conditionalFilterType, typeMapper } from './conditionalFilterConstants';
import PropTypes from 'prop-types';
import './conditional-filter.scss';

class ConditionalFilter extends Component {
state = {
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/ConditionalFilter/TextFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { Component, Fragment } from 'react';
import PropTypes from 'prop-types';
import { TextInput } from '@patternfly/react-core';
import { SearchIcon } from '@patternfly/react-icons';
import './conditional-filter.scss';

class Text extends Component {
state = {
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/ConditionalFilter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ export { default as RadioFilter } from './RadioFilter';
export { default as CheckboxFilter } from './CheckboxFilter';
export { default as TextFilter } from './TextFilter';
export * from './conditionalFilterConstants';
import './conditional-filter.scss';
1 change: 1 addition & 0 deletions packages/components/src/FilterChips/FilterChips.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { Badge, Chip, ChipGroup, Button } from '@patternfly/react-core';
import classNames from 'classnames';
import './filter-chips.scss';

const FilterChips = ({ className, filters, onDelete }) => {
const groupedFilters = filters.filter(group => group.category).map(group => (
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/FilterChips/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export { default } from './FilterChips';
export { default as FilterChips } from './FilterChips';
import './filter-chips.scss';
1 change: 0 additions & 1 deletion packages/components/src/FilterHooks/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export { useTagsFilter as default } from './tagFilterHook';
export * from './tagFilterHook';
export * from './constants';
import './tagFilterHook.scss';
1 change: 1 addition & 0 deletions packages/components/src/FilterHooks/tagFilterHook.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useState, useEffect } from 'react';
import { constructGroups, mapGroups } from './constants';
import { Spinner } from '@patternfly/react-core';
import './tagFilterHook.scss';

export const tagsFilterState = { tagsFilter: {} };
export const TAGS_FILTER = 'TAGS_FILTER';
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/Filters/FilterDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { Component } from 'react';
import { Dropdown, DropdownToggle, Level } from '@patternfly/react-core';
import PropTypes from 'prop-types';
import FilterInput from './FilterInput.js';
import './filter-dropdown.scss';

class FilterDropdown extends Component {
state = {
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/Filters/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export { default as FilterDropdown } from './FilterDropdown';
export { default as FilterInput } from './FilterInput';
import './filters.scss';
1 change: 1 addition & 0 deletions packages/components/src/InvalidObject/InvalidObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
Title,
Button
} from '@patternfly/react-core';
import './invalidObject.scss';

// Don't use chrome here because the 404 page on landing does not use chrome
const isBeta = () => {
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/InvalidObject/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export { default } from './InvalidObject';
export { default as InvalidObject } from './InvalidObject';
export { default as Icon404 } from './icon-404';
import './invalidObject.scss';
1 change: 1 addition & 0 deletions packages/components/src/Main/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import propTypes from 'prop-types';
import classNames from 'classnames';
import { connect } from 'react-redux';
import ThemeContext from '../Dark/configContext';
import './main.scss';

const toKebab = text => text.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();

Expand Down
1 change: 0 additions & 1 deletion packages/components/src/Main/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export { default } from './Main';
export { default as Main } from './Main';
import './main.scss';
1 change: 0 additions & 1 deletion packages/components/src/Maintenance/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export { default } from './Maintenance';
export { default as Maintenance } from './Maintenance';
import './maintenance.scss';
1 change: 0 additions & 1 deletion packages/components/src/NotAuthorized/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export { default } from './NotAuthorized';
export { default as NotAuthorized } from './NotAuthorized';
import './NotAuthorized.scss';
1 change: 1 addition & 0 deletions packages/components/src/PageHeader/PageHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import propTypes from 'prop-types';
import classNames from 'classnames';

import ThemeContext from '../Dark/configContext';
import './page-header.scss';

/**
* This is a page header that mimics the patternfly layout for a header section
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/PageHeader/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export { default } from './PageHeader';
export { default as PageHeader } from './PageHeader';
export { default as PageHeaderTitle } from './PageHeaderTitle';
import './page-header.scss';
1 change: 1 addition & 0 deletions packages/components/src/PrimaryToolbar/PrimaryToolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { FilterChips } from '../FilterChips';
import PropTypes from 'prop-types';
import SortBy from './SortBy';
import { SortByDirection } from '@patternfly/react-table';
import './primary-toolbar.scss';

class PrimaryToolbar extends Component {
render() {
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/PrimaryToolbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ export { default as PrimaryToolbar } from './PrimaryToolbar';
export { default as Actions } from './Actions';
export { default as SortBy } from './SortBy';
export * from './SortBy';
import './primary-toolbar.scss';
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import { Button, ButtonVariant, Dropdown, DropdownToggle, DropdownItem } from '@patternfly/react-core';
import { Input } from '../Input';
import { SearchIcon } from '@patternfly/react-icons';
import './simple-table-filter.scss';

class SimpleFilter extends Component {
state = {
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/SimpleTableFilter/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export { default } from './SimpleTableFilter';
import './simple-table-filter.scss';
export { default as SimpleTableFilter } from './SimpleTableFilter';
1 change: 1 addition & 0 deletions packages/components/src/TabLayout/TabLayout.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import './tab-layout.scss';

const TabLayout = ({ children, items, classNames, active, onTabClick, ...props }) => (
<section { ...props } className={ classnames(classNames, 'ins-tab-layout') } widget-type='InsightsTabs'>
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/TabLayout/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export { default } from './TabLayout';
export { default as TabLayout } from './TabLayout';
import './tab-layout.scss';
1 change: 1 addition & 0 deletions packages/components/src/TagCount/TagCount.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import './tagCount.scss';
import classNames from 'classnames';
import { Button } from '@patternfly/react-core';
import { TagIcon } from '@patternfly/react-icons';
import './tagCount.scss';

const TagCount = ({ count, onTagClick, className, ...props }) => {
return (
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/TagCount/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export { default } from './TagCount';
export { default as TagCount } from './TagCount';
import './tagCount.scss';
1 change: 1 addition & 0 deletions packages/components/src/TreeTable/decorator.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import { Button } from '@patternfly/react-core';
import { AngleRightIcon } from '@patternfly/react-icons';
import './styles.scss';

export default (onCollapse) => (value = '', { rowData, ...props } = { rowData: {} }) => ({
value,
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/TreeTable/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export { default } from './decorator';
import './styles.scss';
export { default as treeTable } from './decorator';
export { default as TreeRowWrapper } from './rowWrapper';
export * from './helpers';
1 change: 1 addition & 0 deletions packages/components/src/Unavailable/Unavailable.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import { EmptyState, EmptyStateIcon, EmptyStateVariant, EmptyStateBody, Title } from '@patternfly/react-core';
import { ExclamationCircleIcon } from '@patternfly/react-icons';
import './Unavailable.scss';

const Unavailable = () => {
return (
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/Unavailable/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export { default } from './Unavailable';
export { default as Unavailable } from './Unavailable';
import './Unavailable.scss';
2 changes: 1 addition & 1 deletion packages/components/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@import './EmptyTable/EmptyTable.scss';
@import './FilterChips/filter-chips.scss';
@import './FilterHooks/tagFilterHook.scss';
@import './Filters/filters.scss';
@import './Filters/filter-dropdown.scss';
@import './InsightsLabel/critical-icon.scss';
@import './InsightsLabel/labels.scss';
@import './InvalidObject/icon-404.scss';
Expand Down

0 comments on commit c9abd9f

Please sign in to comment.