Skip to content

Commit

Permalink
Merge branch 'master' into fix/update-carbon-theme-when-nested
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblack authored Apr 2, 2020
2 parents a476cbf + 9c1896a commit e001fae
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 10 deletions.
6 changes: 1 addition & 5 deletions packages/components/docs/sass.md
Original file line number Diff line number Diff line change
Expand Up @@ -3411,7 +3411,6 @@ $carbon--spacing-04: 0.75rem;
- **Used by**:
- [dropdown [mixin]](#dropdown-mixin)
- [lists [mixin]](#lists-mixin)
- [inline-notifications [mixin]](#inline-notifications-mixin)
- [text-area [mixin]](#text-area-mixin)
- [tooltip--definition--legacy [mixin]](#tooltip--definition--legacy-mixin)

Expand Down Expand Up @@ -19574,14 +19573,12 @@ Inline notification styles
.#{$prefix}--inline-notification__text-wrapper {
display: flex;
flex-wrap: wrap;
align-items: center;
padding: $carbon--spacing-04 0;
padding: rem(15px) 0;
}

.#{$prefix}--inline-notification__title {
@include type-style('productive-heading-01');
margin: 0 $carbon--spacing-02 0 0;
line-height: rem(24px);
}

.#{$prefix}--inline-notification__subtitle {
Expand Down Expand Up @@ -19684,7 +19681,6 @@ Inline notification styles
- [support-04 [variable]](#support-04-variable)
- [inverse-support-03 [variable]](#inverse-support-03-variable)
- [support-03 [variable]](#support-03-variable)
- [carbon--spacing-04 [variable]](#carbon--spacing-04-variable)
- [carbon--spacing-02 [variable]](#carbon--spacing-02-variable)
- [carbon--spacing-03 [variable]](#carbon--spacing-03-variable)
- [inverse-focus-ui [variable]](#inverse-focus-ui-variable)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,12 @@
.#{$prefix}--inline-notification__text-wrapper {
display: flex;
flex-wrap: wrap;
align-items: center;
padding: $carbon--spacing-04 0;
padding: rem(15px) 0;
}

.#{$prefix}--inline-notification__title {
@include type-style('productive-heading-01');
margin: 0 $carbon--spacing-02 0 0;
line-height: rem(24px);
}

.#{$prefix}--inline-notification__subtitle {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"dependencies": {
"carbon-components": "latest",
"carbon-components-react": "latest",
"carbon-icons": "latest",
"react": "16.10.2",
"react-dom": "16.10.2",
"react-scripts": "3.2.0"
Expand Down
16 changes: 15 additions & 1 deletion packages/react/examples/drag-and-drop-file-uploader/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import React, { useState, useCallback } from 'react';
import React, { useState, useCallback, useEffect } from 'react';
import { render } from 'react-dom';
import { settings } from 'carbon-components';
import {
Expand All @@ -24,6 +24,20 @@ const { prefix } = settings;

function ExampleDropContainerApp(props) {
const [files, setFiles] = useState([]);
const handleDrop = e => {
e.preventDefault();
};
const handleDragover = e => {
e.preventDefault();
};
useEffect(() => {
document.addEventListener('drop', handleDrop);
document.addEventListener('dragover', handleDragover);
return () => {
document.removeEventListener('drop', handleDrop);
document.removeEventListener('dragover', handleDragover);
};
}, []);
const uploadFile = async fileToUpload => {
// file size validation
if (fileToUpload.filesize > 512000) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import React, { useState, useCallback } from 'react';
import React, { useState, useCallback, useEffect } from 'react';
import { settings } from 'carbon-components';
import FileUploaderItem from '../FileUploaderItem';
import FileUploaderDropContainer from '../FileUploaderDropContainer';
Expand All @@ -16,6 +16,20 @@ const { prefix } = settings;

function ExampleDropContainerApp(props) {
const [files, setFiles] = useState([]);
const handleDrop = e => {
e.preventDefault();
};
const handleDragover = e => {
e.preventDefault();
};
useEffect(() => {
document.addEventListener('drop', handleDrop);
document.addEventListener('dragover', handleDragover);
return () => {
document.removeEventListener('drop', handleDrop);
document.removeEventListener('dragover', handleDragover);
};
}, []);
const uploadFile = async fileToUpload => {
// file size validation
if (fileToUpload.filesize > 512000) {
Expand Down

0 comments on commit e001fae

Please sign in to comment.