mirror of
https://github.com/fluxscape/fluxscape.git
synced 2026-01-11 23:02:55 +01:00
Compare commits
1 Commits
testing-ne
...
feature/sl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1190dbdf89 |
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
|
|||||||
|
|
||||||
import Layout from '../../../layout';
|
import Layout from '../../../layout';
|
||||||
import Utils from '../../../nodes/controls/utils';
|
import Utils from '../../../nodes/controls/utils';
|
||||||
import { Noodl } from '../../../types';
|
import { Noodl, Slot } from '../../../types';
|
||||||
|
|
||||||
export interface SliderProps extends Noodl.ReactProps {
|
export interface SliderProps extends Noodl.ReactProps {
|
||||||
_nodeId: string;
|
_nodeId: string;
|
||||||
@@ -24,6 +24,8 @@ export interface SliderProps extends Noodl.ReactProps {
|
|||||||
|
|
||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
updateOutputValue: (value: number) => void;
|
updateOutputValue: (value: number) => void;
|
||||||
|
|
||||||
|
children: Slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
function _styleTemplate(_class: string, props: SliderProps) {
|
function _styleTemplate(_class: string, props: SliderProps) {
|
||||||
@@ -168,7 +170,9 @@ export function Slider(props: SliderProps) {
|
|||||||
return (
|
return (
|
||||||
<div style={divStyle}>
|
<div style={divStyle}>
|
||||||
<div style={trackStyle} />
|
<div style={trackStyle} />
|
||||||
<div style={thumbStyle} />
|
<div style={thumbStyle}>
|
||||||
|
{props.children}
|
||||||
|
</div>
|
||||||
<input
|
<input
|
||||||
className={className}
|
className={className}
|
||||||
{...Utils.controlEvents(props)}
|
{...Utils.controlEvents(props)}
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ const RangeNode = {
|
|||||||
name: 'net.noodl.controls.range',
|
name: 'net.noodl.controls.range',
|
||||||
displayNodeName: 'Slider',
|
displayNodeName: 'Slider',
|
||||||
docs: 'https://docs.noodl.net/nodes/ui-controls/slider',
|
docs: 'https://docs.noodl.net/nodes/ui-controls/slider',
|
||||||
allowChildren: false,
|
|
||||||
noodlNodeAsProp: true,
|
noodlNodeAsProp: true,
|
||||||
connectionPanel: {
|
connectionPanel: {
|
||||||
groupPriority: [
|
groupPriority: [
|
||||||
|
|||||||
Reference in New Issue
Block a user